From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from wohnheim.fh-wedel.de ([213.39.233.138]) by canuck.infradead.org with esmtp (Exim 4.62 #1 (Red Hat Linux)) id 1FeJpA-0003Lc-Ee for linux-mtd@lists.infradead.org; Thu, 11 May 2006 18:40:15 -0400 Date: Fri, 12 May 2006 00:39:48 +0200 From: =?iso-8859-1?Q?J=F6rn?= Engel To: Linux-MTD Mailing List Message-ID: <20060511223948.GG14232@wohnheim.fh-wedel.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Cc: David Woodhouse Subject: Re: [MTD] Basic NAND driver for AMD/NatSemi CS5535/CS5536 Geode companion chip List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Thu, 11 May 2006 22:59:02 +0100, Linux-MTD Mailing List wrote: > > +static int cs553x_device_ready(struct mtd_info *mtd) > +{ > + struct nand_chip *this = mtd->priv; > + void __iomem *mmio_base = this->IO_ADDR_R; > + unsigned char foo = readb(mmio_base + MM_NAND_STS); > + > + return (foo & CS_NAND_STS_FLASH_RDY) && !(foo & CS_NAND_CTLR_BUSY); Foo? > + /* Initialize structures */ > + memset((char *) new_mtd, 0, sizeof(struct mtd_info)); > + memset((char *) this, 0, sizeof(struct nand_chip)); Why the cast? > + kfree (new_mtd); Extra space. Jörn -- Invincibility is in oneself, vulnerability is in the opponent. -- Sun Tzu