* [PATCH] OMAP2/3: mmc-twl4030: Free up MMC regulators while cleaning up
@ 2009-06-23 13:01 Roger Quadros
2009-08-05 15:25 ` Roger Quadros
2009-08-06 6:49 ` [APPLIED] [PATCH] OMAP2/3: mmc-twl4030: Free up MMC regulators while cleaning Tony Lindgren
0 siblings, 2 replies; 4+ messages in thread
From: Roger Quadros @ 2009-06-23 13:01 UTC (permalink / raw)
To: tony; +Cc: linux-omap
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
--
1.6.0.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] OMAP2/3: mmc-twl4030: Free up MMC regulators while cleaning up
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
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
1 sibling, 1 reply; 4+ messages in thread
From: Roger Quadros @ 2009-08-05 15:25 UTC (permalink / raw)
To: ext Roger Quadros; +Cc: tony, linux-omap
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
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] OMAP2/3: mmc-twl4030: Free up MMC regulators while cleaning up
2009-08-05 15:25 ` Roger Quadros
@ 2009-08-06 6:48 ` Tony Lindgren
0 siblings, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2009-08-06 6:48 UTC (permalink / raw)
To: Roger Quadros; +Cc: linux-omap
* Roger Quadros <ext-roger.quadros@nokia.com> [090805 18:25]:
> Tony,
>
> any comments on this?
Thanks for pinging me, will add it to my omap-fixes queue.
Tony
> 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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [APPLIED] [PATCH] OMAP2/3: mmc-twl4030: Free up MMC regulators while cleaning
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
@ 2009-08-06 6:49 ` Tony Lindgren
1 sibling, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2009-08-06 6:49 UTC (permalink / raw)
To: linux-omap
This patch has been applied to the linux-omap
by youw fwiendly patch wobot.
Branch in linux-omap: omap-fixes
Initial commit ID (Likely to change): 8b28d125dcfa4a250a897baa2425d1f30dd56219
PatchWorks
http://patchwork.kernel.org/patch/31970/
Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=8b28d125dcfa4a250a897baa2425d1f30dd56219
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-08-06 6:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox