aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJamie Iles <jamie@jamieiles.com>2011-05-23 05:23:30 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2011-05-24 21:23:46 -0400
commit54e07f5482cf76e87f1f56f709f279b164a620a5 (patch)
tree2c7335539761d6c456f6a61f0d608e285a70fd8b
parenta04d23dfea631993bcb256c638e379c002af9e4f (diff)
mtd: omap2: 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/omap2.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index 39f46a0cf34..0db2c0e7656 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -94,9 +94,7 @@
94#define P4e_s(a) (TF(a & NAND_Ecc_P4e) << 0) 94#define P4e_s(a) (TF(a & NAND_Ecc_P4e) << 0)
95#define P4o_s(a) (TF(a & NAND_Ecc_P4o) << 1) 95#define P4o_s(a) (TF(a & NAND_Ecc_P4o) << 1)
96 96
97#ifdef CONFIG_MTD_PARTITIONS
98static const char *part_probes[] = { "cmdlinepart", NULL }; 97static const char *part_probes[] = { "cmdlinepart", NULL };
99#endif
100 98
101/* oob info generated runtime depending on ecc algorithm and layout selected */ 99/* oob info generated runtime depending on ecc algorithm and layout selected */
102static struct nand_ecclayout omap_oobinfo; 100static struct nand_ecclayout omap_oobinfo;
@@ -1105,15 +1103,13 @@ static int __devinit omap_nand_probe(struct platform_device *pdev)
1105 goto out_release_mem_region; 1103 goto out_release_mem_region;
1106 } 1104 }
1107 1105
1108#ifdef CONFIG_MTD_PARTITIONS
1109 err = parse_mtd_partitions(&info->mtd, part_probes, &info->parts, 0); 1106 err = parse_mtd_partitions(&info->mtd, part_probes, &info->parts, 0);
1110 if (err > 0) 1107 if (err > 0)
1111 add_mtd_partitions(&info->mtd, info->parts, err); 1108 mtd_device_register(&info->mtd, info->parts, err);
1112 else if (pdata->parts) 1109 else if (pdata->parts)
1113 add_mtd_partitions(&info->mtd, pdata->parts, pdata->nr_parts); 1110 mtd_device_register(&info->mtd, pdata->parts, pdata->nr_parts);
1114 else 1111 else
1115#endif 1112 mtd_device_register(&info->mtd, NULL, 0);
1116 add_mtd_device(&info->mtd);
1117 1113
1118 platform_set_drvdata(pdev, &info->mtd); 1114 platform_set_drvdata(pdev, &info->mtd);
1119 1115