]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/mtd/nand/omap_gpmc.c
nand: Embed mtd_info in struct nand_chip
[karo-tx-uboot.git] / drivers / mtd / nand / omap_gpmc.c
index 6a45d28a72d2d02e7d9ca68a372db1f967df7175..f2ee90ee61175dc80349ec13c78e9db8f698a900 100644 (file)
@@ -898,12 +898,12 @@ int __maybe_unused omap_nand_switch_ecc(uint32_t hardware, uint32_t eccstrength)
 
        if (nand_curr_device < 0 ||
            nand_curr_device >= CONFIG_SYS_MAX_NAND_DEVICE ||
-           !nand_info[nand_curr_device].name) {
+           !nand_info[nand_curr_device]->name) {
                printf("nand: error: no NAND devices found\n");
                return -ENODEV;
        }
 
-       mtd = &nand_info[nand_curr_device];
+       mtd = nand_info[nand_curr_device];
        nand = mtd->priv;
        nand->options |= NAND_OWN_BUFFERS;
        nand->options &= ~NAND_SUBPAGE_READ;