]> git.sur5r.net Git - u-boot/commitdiff
NAND: move board_nand_init to nand.h
authorMike Frysinger <vapier@gentoo.org>
Sat, 6 Dec 2008 07:40:55 +0000 (02:40 -0500)
committerScott Wood <scottwood@freescale.com>
Fri, 23 Jan 2009 16:32:49 +0000 (10:32 -0600)
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 <vapier@gentoo.org>
Signed-off-by: Scott Wood <scottwood@freescale.com>
drivers/mtd/nand/nand.c
include/nand.h

index eeb19ff1b93392e5964d40c5ccd25b67df5f52db..cf9261786d8e497472684d379b01cb00c7afb12c 100644 (file)
@@ -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)
 {
index b4f316f71a31a4a644ea0c805bae1acb3da6b31e..065a42c3ee056a4367bb1a3f919003124dbf6651 100644 (file)
@@ -31,6 +31,8 @@ extern void nand_init(void);
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/nand.h>
 
+extern int board_nand_init(struct nand_chip *nand);
+
 typedef struct mtd_info nand_info_t;
 
 extern int nand_curr_device;