linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Magnus Damm <magnus.damm@gmail.com>
To: linux-mmc@vger.kernel.org
Cc: sameo@linux.intel.com, linux-sh@vger.kernel.org,
	linus.ml.walleij@gmail.com, akpm@linux-foundation.org,
	goda.yusuke@renesas.com, ian@mnementh.co.uk, lethal@linux-sh.org,
	Magnus Damm <magnus.damm@gmail.com>,
	g.liakhovetski@gmx.de
Subject: [PATCH 05/05] tmio_mmc: Balance cell enable()/disable() calls
Date: Wed, 17 Feb 2010 07:38:23 +0000	[thread overview]
Message-ID: <20100217073823.32726.10307.sendpatchset@t400s> (raw)
In-Reply-To: <20100217073735.32726.12020.sendpatchset@t400s>

From: Magnus Damm <damm@opensource.se>

This patch adds cell->disable() calls to the tmio-mmc
probe() error handling and the remove() function.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 Previously posted to linux-mmc 20091126 as
 "[PATCH 03/03] mmc: Balance tmio-mmc cell enable()/disable() calls"

 drivers/mmc/host/tmio_mmc.c |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

--- 0004/drivers/mmc/host/tmio_mmc.c
+++ work/drivers/mmc/host/tmio_mmc.c	2010-02-17 15:54:01.000000000 +0900
@@ -569,14 +569,14 @@ static int __devinit tmio_mmc_probe(stru
 	if (ret >= 0)
 		host->irq = ret;
 	else
-		goto unmap_ctl;
+		goto cell_disable;
 
 	disable_mmc_irqs(host, TMIO_MASK_ALL);
 
 	ret = request_irq(host->irq, tmio_mmc_irq, IRQF_DISABLED |
 		IRQF_TRIGGER_FALLING, dev_name(&dev->dev), host);
 	if (ret)
-		goto unmap_ctl;
+		goto cell_disable;
 
 	mmc_add_host(mmc);
 
@@ -588,6 +588,9 @@ static int __devinit tmio_mmc_probe(stru
 
 	return 0;
 
+cell_disable:
+	if (cell->disable)
+		cell->disable(dev);
 unmap_ctl:
 	iounmap(host->ctl);
 host_free:
@@ -598,6 +601,7 @@ out:
 
 static int __devexit tmio_mmc_remove(struct platform_device *dev)
 {
+	struct mfd_cell	*cell = (struct mfd_cell *)dev->dev.platform_data;
 	struct mmc_host *mmc = platform_get_drvdata(dev);
 
 	platform_set_drvdata(dev, NULL);
@@ -606,6 +610,8 @@ static int __devexit tmio_mmc_remove(str
 		struct tmio_mmc_host *host = mmc_priv(mmc);
 		mmc_remove_host(mmc);
 		free_irq(host->irq, host);
+		if (cell->disable)
+			cell->disable(dev);
 		iounmap(host->ctl);
 		mmc_free_host(mmc);
 	}

  parent reply	other threads:[~2010-02-17  7:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-17  7:37 [PATCH 00/05] tmio_mmc: SDHI hotplug and random fixes Magnus Damm
2010-02-17  7:37 ` [PATCH 01/05] tmio_mmc: Keep card-detect interrupts enabled Magnus Damm
2010-02-17  7:37 ` [PATCH 02/05] tmio_mmc: Add MMC_CAP_MMC_HIGHSPEED support V2 Magnus Damm
2010-02-17  7:38 ` [PATCH 03/05] tmio_mmc: Use 100ms mmc_detect_change() delay Magnus Damm
2010-02-17  7:38 ` [PATCH 04/05] tmio_mmc: Remove const from platform data V3 Magnus Damm
2010-02-17  7:38 ` Magnus Damm [this message]
2010-02-19 11:46 ` [PATCH 00/05] tmio_mmc: SDHI hotplug and random fixes Samuel Ortiz
2010-02-22  4:43   ` Magnus Damm
2010-02-28 19:03     ` Samuel Ortiz

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=20100217073823.32726.10307.sendpatchset@t400s \
    --to=magnus.damm@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=g.liakhovetski@gmx.de \
    --cc=goda.yusuke@renesas.com \
    --cc=ian@mnementh.co.uk \
    --cc=lethal@linux-sh.org \
    --cc=linus.ml.walleij@gmail.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).