]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/mtd/nand/lpc32xx_nand_mlc.c
nand: Embed mtd_info in struct nand_chip
[karo-tx-uboot.git] / drivers / mtd / nand / lpc32xx_nand_mlc.c
index 8156fe9613e719fdba9e6a15cfe91c8a3ded9fae..236b0becd7903f13a93126605171b421276f8fa1 100644 (file)
@@ -539,13 +539,11 @@ static struct nand_chip lpc32xx_chip;
 
 void board_nand_init(void)
 {
-       /* we have only one device anyway */
-       struct mtd_info *mtd = &nand_info[0];
-       /* chip is struct nand_chip, and is now provided by the driver. */
-       mtd->priv = &lpc32xx_chip;
-       /* to store return status in case we need to print it */
+       struct mtd_info *mtd = &lpc32xx_chip.mtd;
        int ret;
 
+       mtd->priv = &lpc32xx_chip;
+
        /* Set all BOARDSPECIFIC (actually core-specific) fields  */
 
        lpc32xx_chip.IO_ADDR_R = &lpc32xx_nand_mlc_registers->buff;
@@ -597,7 +595,7 @@ void board_nand_init(void)
        }
 
        /* chip is good, register it */
-       ret = nand_register(0);
+       ret = nand_register(0, mtd);
        if (ret)
                error("nand_register returned %i", ret);
 }