All of lore.kernel.org
 help / color / mirror / Atom feed
From: Axel Lin <axel.lin@ingics.com>
To: Chris Ball <cjb@laptop.org>
Cc: Christian Daudt <csd@broadcom.com>, linux-mmc@vger.kernel.org
Subject: [PATCH 1/2] mmc: sdhci-bcm-kona: Use sdhci_pltfm_unregister instead of open coded
Date: Tue, 17 Sep 2013 15:59:32 +0800	[thread overview]
Message-ID: <1379404772.12080.1.camel@phoenix> (raw)

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>
---
 drivers/mmc/host/sdhci-bcm-kona.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

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 = {
-- 
1.8.1.2




             reply	other threads:[~2013-09-17  7:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-17  7:59 Axel Lin [this message]
2013-09-17  8:00 ` [PATCH 2/2] mmc: sdhci-bcm2835: Use sdhci_pltfm_unregister instead of open coded Axel Lin
2013-09-18 20:51   ` Stephen Warren
2013-09-20 17:32 ` [PATCH 1/2] mmc: sdhci-bcm-kona: " Christian Daudt
2013-09-26  2:06 ` Chris Ball

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1379404772.12080.1.camel@phoenix \
    --to=axel.lin@ingics.com \
    --cc=cjb@laptop.org \
    --cc=csd@broadcom.com \
    --cc=linux-mmc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.