diff options
author | Jamie Iles <jamie@jamieiles.com> | 2011-05-23 05:23:27 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2011-05-24 21:23:38 -0400 |
commit | 759f1d325c381470a48c666eb2430af4834ef3ee (patch) | |
tree | d858ea86b816ea10c47def20484acda60ae62796 | |
parent | 248f56d3870c03a031755a403f942028c68d39e2 (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>
-rw-r--r-- | drivers/mtd/nand/mxc_nand.c | 13 |
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 | ||
247 | static const char *part_probes[] = { "RedBoot", "cmdlinepart", NULL }; | 246 | static const char *part_probes[] = { "RedBoot", "cmdlinepart", NULL }; |
248 | #endif | ||
249 | 247 | ||
250 | static irqreturn_t mxc_nfc_irq(int irq, void *dev_id) | 248 | static 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); |