From: David Brownell Date: Tue, 17 May 2005 01:59:56 +0000 (-0700) Subject: [PATCH] ARM: OMAP: nand flash and cmdlinepart X-Git-Tag: v2.6.13-omap1~151 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=5b3d408ca368c4bf1a74bd7cd5bbf92f96cd3087;p=linux-2.6-omap-h63xx.git [PATCH] ARM: OMAP: nand flash and cmdlinepart Override the default chip name so command line partitioning can be used. Move probe() to init section. Provide missing "return" statement. Signed-off-by: David Brownell Signed-off-by: Tony Lindgren --- diff --git a/drivers/mtd/nand/omap-nand-flash.c b/drivers/mtd/nand/omap-nand-flash.c index 27a7c35009c..e28595bcf38 100644 --- a/drivers/mtd/nand/omap-nand-flash.c +++ b/drivers/mtd/nand/omap-nand-flash.c @@ -110,11 +110,12 @@ static int omap_nand_ready(struct mtd_info *mtd) return omap_get_gpio_datain(H2_NAND_RB_GPIO_PIN); if (machine_is_netstar()) return omap_get_gpio_datain(NETSTAR_NAND_RB_GPIO_PIN); + return 0; } /* Scan to find existance of the device at omap_nand_flash_base. This also allocates oob and data internal buffers */ -static int probe_nand_chip(void) +static int __init probe_nand_chip(void) { struct nand_chip *this; @@ -150,6 +151,8 @@ static int probe_nand_chip(void) return 0; } +static char nand1_name [] = "nand"; + /* * Main initialization routine */ @@ -214,6 +217,7 @@ int __init omap_nand_init (void) /* try the first address */ omap_nand_flash_base = ioremap(OMAP_NAND_FLASH_START1, SZ_4K); + omap_nand_mtd->name = nand1_name; if (probe_nand_chip()){ nandboot = 1; /* try the second address */