Skip to content

Commit

Permalink
mtd: bf5xx_nand: convert to mtd_device_register()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jamie Iles authored and David Woodhouse committed May 25, 2011
1 parent 63c9dd9 commit 8814687
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions drivers/mtd/nand/bf5xx_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8814687

Please sign in to comment.