mtd: nomadik_nand: convert to mtd_device_register()
authorJamie Iles <jamie@jamieiles.com>
Mon, 23 May 2011 09:23:29 +0000 (10:23 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Wed, 25 May 2011 01:23:45 +0000 (02:23 +0100)
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>
drivers/mtd/nand/nomadik_nand.c

index a045a4a581b62240ddc69aa43b465f0a026b0b84..b6a5c86ab31e922e1ddcf81dc88257012d61ad08 100644 (file)
@@ -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;