[PATCH 48/62] mtd/nomadik_nand: convert to mtd_device_register()
Jamie Iles
jamie at jamieiles.com
Mon May 23 05:23:29 EDT 2011
Convert to mtd_device_register() and remove the CONFIG_MTD_PARTITIONS
preprocessor conditionals as partitioning is always available.
Cc: David Woodhouse <dwmw2 at infradead.org>
Cc: Artem Bityutskiy <dedekind1 at gmail.com>
Signed-off-by: Jamie Iles <jamie at jamieiles.com>
---
drivers/mtd/nand/nomadik_nand.c | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/drivers/mtd/nand/nomadik_nand.c b/drivers/mtd/nand/nomadik_nand.c
index a045a4a..b6a5c86 100644
--- a/drivers/mtd/nand/nomadik_nand.c
+++ b/drivers/mtd/nand/nomadik_nand.c
@@ -158,12 +158,7 @@ static int nomadik_nand_probe(struct platform_device *pdev)
goto err_unmap;
}
-#ifdef CONFIG_MTD_PARTITIONS
- add_mtd_partitions(&host->mtd, pdata->parts, pdata->nparts);
-#else
- pr_info("Registering %s as whole device\n", mtd->name);
- add_mtd_device(mtd);
-#endif
+ mtd_device_register(&host->mtd, pdata->parts, pdata->nparts);
platform_set_drvdata(pdev, host);
return 0;
--
1.7.4.4
More information about the linux-mtd
mailing list