mtd: bf5xx_nand: convert to mtd_device_register()
authorJamie Iles <jamie@jamieiles.com>
Mon, 23 May 2011 09:23:15 +0000 (10:23 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Wed, 25 May 2011 01:23:15 +0000 (02:23 +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/bf5xx_nand.c

index 79947bea4d57aa7b075c766ab3038c9996cfb391..dd899cb5d366e4de044ec16129000bb99c6fcc58 100644 (file)
@@ -659,15 +659,10 @@ static int bf5xx_nand_hw_init(struct bf5xx_nand_info *info)
 static int __devinit bf5xx_nand_add_partition(struct bf5xx_nand_info *info)
 {
        struct mtd_info *mtd = &info->mtd;
-
-#ifdef CONFIG_MTD_PARTITIONS
        struct mtd_partition *parts = info->platform->partitions;
        int nr = info->platform->nr_partitions;
 
-       return add_mtd_partitions(mtd, parts, nr);
-#else
-       return add_mtd_device(mtd);
-#endif
+       return mtd_device_register(mtd, parts, nr);
 }
 
 static int __devexit bf5xx_nand_remove(struct platform_device *pdev)