[MTD] Basic NAND driver for AMD/NatSemi CS5535/CS5536 Geode companion chip

Jörn Engel joern at wohnheim.fh-wedel.de
Thu May 11 18:39:48 EDT 2006


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




More information about the linux-mtd mailing list