]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
mtd: nand: convert to mtd_device_register()
authorJamie Iles <jamie@jamieiles.com>
Mon, 23 May 2011 09:22:46 +0000 (10:22 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Wed, 25 May 2011 01:20:13 +0000 (02:20 +0100)
Convert to mtd_device_register() and remove the CONFIG_MTD_PARTITIONS
preprocessor conditionals as partitioning is always available.

Signed-off-by: Jamie Iles <jamie@jamieiles.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/nand/nand_base.c

index 2201ca70af24d57c1d51986f5f2ff0d42ab89c86..a46e9bb847bd0ac52743f14ab07133cc9a98b231 100644 (file)
 #include <linux/bitops.h>
 #include <linux/leds.h>
 #include <linux/io.h>
-
-#ifdef CONFIG_MTD_PARTITIONS
 #include <linux/mtd/partitions.h>
-#endif
 
 /* Define default oob placement schemes for large and small page devices */
 static struct nand_ecclayout nand_oob_8 = {
@@ -3535,12 +3532,7 @@ void nand_release(struct mtd_info *mtd)
        if (chip->ecc.mode == NAND_ECC_SOFT_BCH)
                nand_bch_free((struct nand_bch_control *)chip->ecc.priv);
 
-#ifdef CONFIG_MTD_PARTITIONS
-       /* Deregister partitions */
-       del_mtd_partitions(mtd);
-#endif
-       /* Deregister the device */
-       del_mtd_device(mtd);
+       mtd_device_unregister(mtd);
 
        /* Free bad block table memory */
        kfree(chip->bbt);