Commit 88146872 authored by Jamie Iles's avatar Jamie Iles Committed by David Woodhouse

mtd: bf5xx_nand: convert to mtd_device_register()

Convert to mtd_device_register() and remove the CONFIG_MTD_PARTITIONS
preprocessor conditionals as partitioning is always available.
Signed-off-by: default avatarJamie Iles <jamie@jamieiles.com>
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 63c9dd92
...@@ -659,15 +659,10 @@ static int bf5xx_nand_hw_init(struct bf5xx_nand_info *info) ...@@ -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) static int __devinit bf5xx_nand_add_partition(struct bf5xx_nand_info *info)
{ {
struct mtd_info *mtd = &info->mtd; struct mtd_info *mtd = &info->mtd;
#ifdef CONFIG_MTD_PARTITIONS
struct mtd_partition *parts = info->platform->partitions; struct mtd_partition *parts = info->platform->partitions;
int nr = info->platform->nr_partitions; int nr = info->platform->nr_partitions;
return add_mtd_partitions(mtd, parts, nr); return mtd_device_register(mtd, parts, nr);
#else
return add_mtd_device(mtd);
#endif
} }
static int __devexit bf5xx_nand_remove(struct platform_device *pdev) static int __devexit bf5xx_nand_remove(struct platform_device *pdev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment