From: Mike Frysinger Date: Sat, 6 Dec 2008 07:40:55 +0000 (-0500) Subject: NAND: move board_nand_init to nand.h X-Git-Tag: v2009.03-rc1~200^2~5 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=69fb8be4fc07162fdf6edf04bdc7233b0e9a920e;p=u-boot NAND: move board_nand_init to nand.h Rather than putting the function prototype for board_nand_init() in the one place where it gets called, put it into nand.h so that every place that also defines it gets the prototype. Otherwise, errors can go silently unnoticed such as using the wrong return value (void rather than int) when defining the function. Signed-off-by: Mike Frysinger Signed-off-by: Scott Wood --- diff --git a/drivers/mtd/nand/nand.c b/drivers/mtd/nand/nand.c index eeb19ff1b9..cf9261786d 100644 --- a/drivers/mtd/nand/nand.c +++ b/drivers/mtd/nand/nand.c @@ -36,8 +36,6 @@ static ulong base_address[CONFIG_SYS_MAX_NAND_DEVICE] = CONFIG_SYS_NAND_BASE_LIS static const char default_nand_name[] = "nand"; -extern int board_nand_init(struct nand_chip *nand); - static void nand_init_chip(struct mtd_info *mtd, struct nand_chip *nand, ulong base_addr) { diff --git a/include/nand.h b/include/nand.h index b4f316f71a..065a42c3ee 100644 --- a/include/nand.h +++ b/include/nand.h @@ -31,6 +31,8 @@ extern void nand_init(void); #include #include +extern int board_nand_init(struct nand_chip *nand); + typedef struct mtd_info nand_info_t; extern int nand_curr_device;