Commit bde85a86 authored by Todd Poynor's avatar Todd Poynor Committed by Tony Lindgren

[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: default avatarTodd Poynor <tpoynor@mvista.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent ff243070
...@@ -137,11 +137,12 @@ out_free_info: ...@@ -137,11 +137,12 @@ out_free_info:
static int __devexit omapflash_remove(struct platform_device *pdev) static int __devexit omapflash_remove(struct platform_device *pdev)
{ {
struct omapflash_info *info = platform_get_drvdata(pdev); struct omapflash_info *info = platform_get_drvdata(pdev);
struct flash_platform_data *pdata = pdev->dev.platform_data;
platform_set_drvdata(pdev, NULL); platform_set_drvdata(pdev, NULL);
if (info) { if (info) {
if (info->parts) { if (info->parts || (pdata && pdata->parts)) {
del_mtd_partitions(info->mtd); del_mtd_partitions(info->mtd);
kfree(info->parts); kfree(info->parts);
} else } else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment