From: Todd Poynor Date: Wed, 4 Jan 2006 00:10:28 +0000 (-0800) Subject: [PATCH] ARM: OMAP: MTD NOR mapping driver remove partitions created from platform... X-Git-Tag: v2.6.15-omap2~24 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=bde85a863030c70f1504f498f51355cb06078f0a;p=linux-2.6-omap-h63xx.git [PATCH] ARM: OMAP: MTD NOR mapping driver remove partitions created from platform data. OMAP MTD NOR mapping driver remove partitions created from platform data. Signed-off-by: Todd Poynor Signed-off-by: Tony Lindgren --- diff --git a/drivers/mtd/maps/omap_nor.c b/drivers/mtd/maps/omap_nor.c index a6e705fa4e6..6614e9721f9 100644 --- a/drivers/mtd/maps/omap_nor.c +++ b/drivers/mtd/maps/omap_nor.c @@ -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