From bde85a863030c70f1504f498f51355cb06078f0a Mon Sep 17 00:00:00 2001 From: Todd Poynor Date: Tue, 3 Jan 2006 16:10:28 -0800 Subject: [PATCH] [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 --- drivers/mtd/maps/omap_nor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.41.1