Commit 54e07f54 authored by Jamie Iles's avatar Jamie Iles Committed by David Woodhouse

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: default avatarJamie Iles <jamie@jamieiles.com>
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent a04d23df
...@@ -94,9 +94,7 @@ ...@@ -94,9 +94,7 @@
#define P4e_s(a) (TF(a & NAND_Ecc_P4e) << 0) #define P4e_s(a) (TF(a & NAND_Ecc_P4e) << 0)
#define P4o_s(a) (TF(a & NAND_Ecc_P4o) << 1) #define P4o_s(a) (TF(a & NAND_Ecc_P4o) << 1)
#ifdef CONFIG_MTD_PARTITIONS
static const char *part_probes[] = { "cmdlinepart", NULL }; static const char *part_probes[] = { "cmdlinepart", NULL };
#endif
/* oob info generated runtime depending on ecc algorithm and layout selected */ /* oob info generated runtime depending on ecc algorithm and layout selected */
static struct nand_ecclayout omap_oobinfo; static struct nand_ecclayout omap_oobinfo;
...@@ -1105,15 +1103,13 @@ static int __devinit omap_nand_probe(struct platform_device *pdev) ...@@ -1105,15 +1103,13 @@ static int __devinit omap_nand_probe(struct platform_device *pdev)
goto out_release_mem_region; goto out_release_mem_region;
} }
#ifdef CONFIG_MTD_PARTITIONS
err = parse_mtd_partitions(&info->mtd, part_probes, &info->parts, 0); err = parse_mtd_partitions(&info->mtd, part_probes, &info->parts, 0);
if (err > 0) if (err > 0)
add_mtd_partitions(&info->mtd, info->parts, err); mtd_device_register(&info->mtd, info->parts, err);
else if (pdata->parts) else if (pdata->parts)
add_mtd_partitions(&info->mtd, pdata->parts, pdata->nr_parts); mtd_device_register(&info->mtd, pdata->parts, pdata->nr_parts);
else else
#endif mtd_device_register(&info->mtd, NULL, 0);
add_mtd_device(&info->mtd);
platform_set_drvdata(pdev, &info->mtd); platform_set_drvdata(pdev, &info->mtd);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment