From 54694a91428f6c3280fe1ee0923488a1e7e8dbc4 Mon Sep 17 00:00:00 2001
From: Stelian Pop <stelian@popies.net>
Date: Tue, 13 May 2008 17:31:24 +0200
Subject: [PATCH] Cleanup nand_info[] declaration.

The nand_info array is declared as extern in several .c files.
Those days, nand.h contains a reference to the array, so there is
no need to declare it elsewhere.

Signed-off-by: Stelian Pop <stelian@popies.net>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 common/cmd_nand.c      | 2 --
 common/env_nand.c      | 3 ---
 common/lcd.c           | 1 -
 fs/jffs2/jffs2_1pass.c | 3 ---
 4 files changed, 9 deletions(-)

diff --git a/common/cmd_nand.c b/common/cmd_nand.c
index 37eb41b20e..37198d21e8 100644
--- a/common/cmd_nand.c
+++ b/common/cmd_nand.c
@@ -37,8 +37,6 @@ int find_dev_and_part(const char *id, struct mtd_device **dev,
 		u8 *part_num, struct part_info **part);
 #endif
 
-extern nand_info_t nand_info[];       /* info for NAND chips */
-
 static int nand_dump_oob(nand_info_t *nand, ulong off)
 {
 	return 0;
diff --git a/common/env_nand.c b/common/env_nand.c
index 49742f5bfb..f12674d82d 100644
--- a/common/env_nand.c
+++ b/common/env_nand.c
@@ -57,9 +57,6 @@ int nand_legacy_rw (struct nand_chip* nand, int cmd,
 	    size_t start, size_t len,
 	    size_t * retlen, u_char * buf);
 
-/* info for NAND chips, defined in drivers/mtd/nand/nand.c */
-extern nand_info_t nand_info[];
-
 /* references to names in env_common.c */
 extern uchar default_environment[];
 extern int default_environment_size;
diff --git a/common/lcd.c b/common/lcd.c
index 2178f12d5a..ebf377aa89 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -53,7 +53,6 @@
 #if defined(CONFIG_ATMEL_LCD)
 #include <atmel_lcdc.h>
 #include <nand.h>
-extern nand_info_t nand_info[];
 #endif
 
 #ifdef CONFIG_LCD
diff --git a/fs/jffs2/jffs2_1pass.c b/fs/jffs2/jffs2_1pass.c
index a3304384f2..8630334053 100644
--- a/fs/jffs2/jffs2_1pass.c
+++ b/fs/jffs2/jffs2_1pass.c
@@ -164,9 +164,6 @@ static struct part_info *current_part;
 /* this one defined in nand_legacy.c */
 int read_jffs2_nand(size_t start, size_t len,
 		size_t * retlen, u_char * buf, int nanddev);
-#else
-/* info for NAND chips, defined in drivers/mtd/nand/nand.c */
-extern nand_info_t nand_info[];
 #endif
 
 #define NAND_PAGE_SIZE 512
-- 
GitLab