mmc: sdhci-bcm2835: Use sdhci_pltfm_unregister instead of open coded
authorAxel Lin <axel.lin@ingics.com>
Tue, 17 Sep 2013 08:00:47 +0000 (16:00 +0800)
committerChris Ball <cjb@laptop.org>
Thu, 26 Sep 2013 02:05:57 +0000 (22:05 -0400)
This avoid duplicated implementation.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/sdhci-bcm2835.c

index 36fa2df..f6d8d67 100644 (file)
@@ -178,13 +178,7 @@ err:
 
 static int bcm2835_sdhci_remove(struct platform_device *pdev)
 {
-       struct sdhci_host *host = platform_get_drvdata(pdev);
-       int dead = (readl(host->ioaddr + SDHCI_INT_STATUS) == 0xffffffff);
-
-       sdhci_remove_host(host, dead);
-       sdhci_pltfm_free(pdev);
-
-       return 0;
+       return sdhci_pltfm_unregister(pdev);
 }
 
 static const struct of_device_id bcm2835_sdhci_of_match[] = {