Try if pdata provides a cleanup function pointers. For
boards which don't provide it, driver will oops in
omap_remove.
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
platform_set_drvdata(pdev, NULL);
if (host) {
- host->pdata->cleanup(&pdev->dev);
+ if (host->pdata->cleanup)
+ host->pdata->cleanup(&pdev->dev);
free_irq(host->irq, host);
if (mmc_slot(host).card_detect_irq)
free_irq(mmc_slot(host).card_detect_irq, host);