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>
This commit is contained in:
parent
08de89b791
commit
ff1acfd0de
1 changed files with 1 additions and 13 deletions
|
@ -316,19 +316,7 @@ err_pltfm_free:
|
||||||
|
|
||||||
static int __exit sdhci_bcm_kona_remove(struct platform_device *pdev)
|
static int __exit sdhci_bcm_kona_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct sdhci_host *host = platform_get_drvdata(pdev);
|
return sdhci_pltfm_unregister(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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct platform_driver sdhci_bcm_kona_driver = {
|
static struct platform_driver sdhci_bcm_kona_driver = {
|
||||||
|
|
Loading…
Add table
Reference in a new issue