From: Axel Lin Date: Tue, 17 Sep 2013 07:59:32 +0000 (+0800) Subject: mmc: sdhci-bcm-kona: Use sdhci_pltfm_unregister instead of open coded X-Git-Tag: upstream/snapshot3+hdmi~3939^2~76 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ff1acfd0def7487d0554048bc613db4e7c3f3211;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git mmc: sdhci-bcm-kona: Use sdhci_pltfm_unregister instead of open coded This avoid duplicated implementation and also fixes missing iounmap() and release_mem_region() calls in sdhci_bcm_kona_remove(). sdhci_pltfm_init() calls request_mem_region() and ioremap(), thus we need to call the corresponding iounmap() and release_mem_region() calls in sdhci_bcm_kona_remove(). Signed-off-by: Axel Lin Signed-off-by: Chris Ball --- diff --git a/drivers/mmc/host/sdhci-bcm-kona.c b/drivers/mmc/host/sdhci-bcm-kona.c index 85472d3..7a190fe 100644 --- a/drivers/mmc/host/sdhci-bcm-kona.c +++ b/drivers/mmc/host/sdhci-bcm-kona.c @@ -316,19 +316,7 @@ err_pltfm_free: static int __exit sdhci_bcm_kona_remove(struct platform_device *pdev) { - struct sdhci_host *host = platform_get_drvdata(pdev); - int dead; - u32 scratch; - - dead = 0; - scratch = readl(host->ioaddr + SDHCI_INT_STATUS); - if (scratch == (u32)-1) - dead = 1; - sdhci_remove_host(host, dead); - - sdhci_free_host(host); - - return 0; + return sdhci_pltfm_unregister(pdev); } static struct platform_driver sdhci_bcm_kona_driver = {