mtd: tegra-nor: Fix build with kernel 3.4
Sandeep S. Trasi [Tue, 14 Aug 2012 16:02:26 +0000 (21:02 +0530)]
Replace internal function parse_mtd_partitions()
with new api mtd_device_parse_register()

Change-Id: Ic01543ed3e21d347e2ae24645d36fdc6b99f5273
Signed-off-by: Sandeep S. Trasi <strasi@nvidia.com>
Reviewed-on: http://git-master/r/123384
Tested-by: Bob Johnston <bjohnston@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

drivers/mtd/maps/tegra_nor.c

index 5e66daf..1a3da05 100644 (file)
@@ -417,15 +417,7 @@ static int tegra_nor_probe(struct platform_device *pdev)
        info->parts = NULL;
 
        platform_set_drvdata(pdev, info);
-       err = parse_mtd_partitions(info->mtd, part_probes, &info->parts, 0);
-       if (err > 0)
-               err = mtd_device_register(info->mtd, info->parts, err);
-       else if (err <= 0 && plat->flash.parts)
-               err =
-                   mtd_device_register(info->mtd, plat->flash.parts,
-                                      plat->flash.nr_parts);
-       else
-               mtd_device_register(info->mtd, NULL, 0);
+       mtd_device_parse_register(info->mtd, part_probes, NULL, info->parts, 0);
 
        return 0;