aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJamie Iles <jamie@jamieiles.com>2011-05-23 05:23:27 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2011-05-24 21:23:38 -0400
commit759f1d325c381470a48c666eb2430af4834ef3ee (patch)
treed858ea86b816ea10c47def20484acda60ae62796 /drivers
parent248f56d3870c03a031755a403f942028c68d39e2 (diff)
mtd: mxc_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: Jamie Iles <jamie@jamieiles.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/nand/mxc_nand.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
index b4efdb704ed2..90df34c4d26c 100644
--- a/drivers/mtd/nand/mxc_nand.c
+++ b/drivers/mtd/nand/mxc_nand.c
@@ -243,9 +243,7 @@ static struct nand_ecclayout nandv2_hw_eccoob_4k = {
243 } 243 }
244}; 244};
245 245
246#ifdef CONFIG_MTD_PARTITIONS
247static const char *part_probes[] = { "RedBoot", "cmdlinepart", NULL }; 246static const char *part_probes[] = { "RedBoot", "cmdlinepart", NULL };
248#endif
249 247
250static irqreturn_t mxc_nfc_irq(int irq, void *dev_id) 248static irqreturn_t mxc_nfc_irq(int irq, void *dev_id)
251{ 249{
@@ -1233,18 +1231,15 @@ static int __init mxcnd_probe(struct platform_device *pdev)
1233 } 1231 }
1234 1232
1235 /* Register the partitions */ 1233 /* Register the partitions */
1236#ifdef CONFIG_MTD_PARTITIONS
1237 nr_parts = 1234 nr_parts =
1238 parse_mtd_partitions(mtd, part_probes, &host->parts, 0); 1235 parse_mtd_partitions(mtd, part_probes, &host->parts, 0);
1239 if (nr_parts > 0) 1236 if (nr_parts > 0)
1240 add_mtd_partitions(mtd, host->parts, nr_parts); 1237 mtd_device_register(mtd, host->parts, nr_parts);
1241 else if (pdata->parts) 1238 else if (pdata->parts)
1242 add_mtd_partitions(mtd, pdata->parts, pdata->nr_parts); 1239 mtd_device_register(mtd, pdata->parts, pdata->nr_parts);
1243 else 1240 else {
1244#endif
1245 {
1246 pr_info("Registering %s as whole device\n", mtd->name); 1241 pr_info("Registering %s as whole device\n", mtd->name);
1247 add_mtd_device(mtd); 1242 mtd_device_register(mtd, NULL, 0);
1248 } 1243 }
1249 1244
1250 platform_set_drvdata(pdev, host); 1245 platform_set_drvdata(pdev, host);