From: Roger Quadros <ext-roger.quadros@nokia.com>
To: ext Roger Quadros <ext-roger.quadros@nokia.com>
Cc: tony@atomide.com, linux-omap@vger.kernel.org
Subject: Re: [PATCH] OMAP2/3: mmc-twl4030: Free up MMC regulators while cleaning up
Date: Wed, 05 Aug 2009 18:25:19 +0300 [thread overview]
Message-ID: <4A79A45F.2090509@nokia.com> (raw)
In-Reply-To: <1245762070-13302-1-git-send-email-ext-roger.quadros@nokia.com>
Tony,
any comments on this?
regards,
-roger
ext Roger Quadros wrote:
> twl_mmc_cleanup() must free up the regulators that were
> allocated by twl_mmc_late_init().
> This eliminates the below error when 'omap_hsmmc' module is
> repeatedly loaded and unloaded.
>
> "sysfs: cannot create duplicate filename '/devices/platform
> /mmci-omap-hs.0/microamps_requested_vmmc'"
>
> Signed-off-by: Roger Quadros <ext-roger.quadros@nokia.com>
> ---
> arch/arm/mach-omap2/mmc-twl4030.c | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/mmc-twl4030.c b/arch/arm/mach-omap2/mmc-twl4030.c
> index 06b252f..0007115 100644
> --- a/arch/arm/mach-omap2/mmc-twl4030.c
> +++ b/arch/arm/mach-omap2/mmc-twl4030.c
> @@ -119,6 +119,7 @@ static int twl_mmc_late_init(struct device *dev)
> if (i != 0)
> break;
> ret = PTR_ERR(reg);
> + hsmmc[i].vcc = NULL;
> goto err;
> }
> hsmmc[i].vcc = reg;
> @@ -165,8 +166,13 @@ done:
> static void twl_mmc_cleanup(struct device *dev)
> {
> struct omap_mmc_platform_data *mmc = dev->platform_data;
> + int i;
>
> gpio_free(mmc->slots[0].switch_pin);
> + for(i = 0; i < ARRAY_SIZE(hsmmc); i++) {
> + regulator_put(hsmmc[i].vcc);
> + regulator_put(hsmmc[i].vcc_aux);
> + }
> }
>
> #ifdef CONFIG_PM
next prev parent reply other threads:[~2009-08-05 15:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-23 13:01 [PATCH] OMAP2/3: mmc-twl4030: Free up MMC regulators while cleaning up Roger Quadros
2009-08-05 15:25 ` Roger Quadros [this message]
2009-08-06 6:48 ` Tony Lindgren
2009-08-06 6:49 ` [APPLIED] [PATCH] OMAP2/3: mmc-twl4030: Free up MMC regulators while cleaning Tony Lindgren
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=4A79A45F.2090509@nokia.com \
--to=ext-roger.quadros@nokia.com \
--cc=linux-omap@vger.kernel.org \
--cc=tony@atomide.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