mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-10 12:39:22 -04:00
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>
This commit is contained in:
parent
c6b734f5ae
commit
7fab9dfffa
@ -43,7 +43,7 @@ static void nand_init_chip(struct mtd_info *mtd, struct nand_chip *nand,
|
|||||||
ulong base_addr)
|
ulong base_addr)
|
||||||
{
|
{
|
||||||
int maxchips = CONFIG_SYS_NAND_MAX_CHIPS;
|
int maxchips = CONFIG_SYS_NAND_MAX_CHIPS;
|
||||||
int __attribute__((unused)) i = 0;
|
static int __attribute__((unused)) i = 0;
|
||||||
|
|
||||||
if (maxchips < 1)
|
if (maxchips < 1)
|
||||||
maxchips = 1;
|
maxchips = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user