]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] ARM: OMAP: MTD NOR mapping driver remove partitions created from platform...
authorTodd Poynor <tpoynor@mvista.com>
Wed, 4 Jan 2006 00:10:28 +0000 (16:10 -0800)
committerTony Lindgren <tony@atomide.com>
Wed, 4 Jan 2006 00:10:28 +0000 (16:10 -0800)
OMAP MTD NOR mapping driver remove partitions created from platform data.

Signed-off-by: Todd Poynor <tpoynor@mvista.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/mtd/maps/omap_nor.c

index a6e705fa4e63b8177103a257310263647eca94b7..6614e9721f9228b4138df80579530c8b63b4c607 100644 (file)
@@ -137,11 +137,12 @@ out_free_info:
 static int __devexit omapflash_remove(struct platform_device *pdev)
 {
        struct omapflash_info *info = platform_get_drvdata(pdev);
+       struct flash_platform_data *pdata = pdev->dev.platform_data;
 
        platform_set_drvdata(pdev, NULL);
 
        if (info) {
-               if (info->parts) {
+               if (info->parts || (pdata && pdata->parts)) {
                        del_mtd_partitions(info->mtd);
                        kfree(info->parts);
                } else