summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand
diff options
context:
space:
mode:
authorAlexander Holler <holler@ahsoftware.de>2010-12-18 02:16:28 +0000
committerScott Wood <scottwood@freescale.com>2011-01-12 17:13:10 -0600
commit7fab9dfffab3a662f6ef1967dcb90618fd28df3c (patch)
tree00bb765bae9b0c6974cd3d0e8bdb951b4a2d001a /drivers/mtd/nand
parentc6b734f5aea2ba75caaa1929f7e649ecda8d2f31 (diff)
downloadu-boot-imx-7fab9dfffab3a662f6ef1967dcb90618fd28df3c.zip
u-boot-imx-7fab9dfffab3a662f6ef1967dcb90618fd28df3c.tar.gz
u-boot-imx-7fab9dfffab3a662f6ef1967dcb90618fd28df3c.tar.bz2
nand: fix bug with multiple NAND devices if CONFIG_MTD_DEVICE is defined.
The variable i has to be static, otherwise it would be always zero. Signed-off-by: Alexander Holler <holler@ahsoftware.de>
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r--drivers/mtd/nand/nand.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/nand/nand.c b/drivers/mtd/nand/nand.c
index c0e068a..d987f4c 100644
--- a/drivers/mtd/nand/nand.c
+++ b/drivers/mtd/nand/nand.c
@@ -43,7 +43,7 @@ static void nand_init_chip(struct mtd_info *mtd, struct nand_chip *nand,
ulong base_addr)
{
int maxchips = CONFIG_SYS_NAND_MAX_CHIPS;
- int __attribute__((unused)) i = 0;
+ static int __attribute__((unused)) i = 0;
if (maxchips < 1)
maxchips = 1;