X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fmtd%2Fmaps%2Fomap_nor.c;fp=drivers%2Fmtd%2Fmaps%2Fomap_nor.c;h=6614e9721f9228b4138df80579530c8b63b4c607;hb=bde85a863030c70f1504f498f51355cb06078f0a;hp=a6e705fa4e63b8177103a257310263647eca94b7;hpb=ff243070af066a92b8c90abb54c0d57a802459b9;p=linux-2.6-omap-h63xx.git 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