summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/sdhci-bcm-kona.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2013-09-17 15:59:32 +0800
committerChris Ball <cjb@laptop.org>2013-09-25 22:05:26 -0400
commitff1acfd0def7487d0554048bc613db4e7c3f3211 (patch)
tree796795f76ea89f1775d3fabb32f7899098b97779 /drivers/mmc/host/sdhci-bcm-kona.c
parent08de89b7915afaba00164f2a972290b86aa27e6d (diff)
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 <axel.lin@ingics.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/sdhci-bcm-kona.c')
-rw-r--r--drivers/mmc/host/sdhci-bcm-kona.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/mmc/host/sdhci-bcm-kona.c b/drivers/mmc/host/sdhci-bcm-kona.c
index 85472d3fd37..7a190fe4dff 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 = {