mtd: nand: Wait for PAGEPROG to finish in drivers setting NAND_ECC_CUSTOM_PAGE_ACCESS
[oweals/u-boot.git] / drivers / mtd / nand / fsmc_nand.c
index a1f2cbae3318bd5f25735c9b27f2f41194292a93..d5d105629369a5ae0def96fc3227e774c09a03ea 100644 (file)
@@ -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 */