X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?p=linux-2.6-omap-h63xx.git;a=blobdiff_plain;f=drivers%2Fmtd%2Fmaps%2Fomap_nor.c;fp=drivers%2Fmtd%2Fmaps%2Fomap_nor.c;h=8cc92958e5e9a025c6895ea0a2566d4f3e20c510;hp=a24478102b118920e1dfd423fa082fa432576345;hb=0d5f2216edfeb9904e0d6512f803b0f93871baaf;hpb=14fc69723d3442ef46f8f82b3f481e82f06a346d diff --git a/drivers/mtd/maps/omap_nor.c b/drivers/mtd/maps/omap_nor.c index a24478102b1..8cc92958e5e 100644 --- a/drivers/mtd/maps/omap_nor.c +++ b/drivers/mtd/maps/omap_nor.c @@ -144,11 +144,12 @@ out_free_info: static int __exit 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