X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=drivers%2Fmtd%2Fnand%2Ffsmc_nand.c;h=d5d105629369a5ae0def96fc3227e774c09a03ea;hb=c7c553f249f99ae282f1fa5c0e314aae0bce8a26;hp=a1f2cbae3318bd5f25735c9b27f2f41194292a93;hpb=ffd859979e2a84bccc14188d9fa760b2e4813515;p=oweals%2Fu-boot.git diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c index a1f2cbae33..d5d1056293 100644 --- a/drivers/mtd/nand/fsmc_nand.c +++ b/drivers/mtd/nand/fsmc_nand.c @@ -409,7 +409,7 @@ int fsmc_nand_switch_ecc(uint32_t eccstrength) * Nomadik SoC is currently supporting this fsmc_nand_switch_ecc() * function, as it doesn't need to switch to a different ECC layout. */ - mtd = nand_info[nand_curr_device]; + mtd = get_nand_dev_by_index(nand_curr_device); nand = mtd_to_nand(mtd); /* Setup the ecc configurations again */