lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4B181BB4.1020800@nokia.com>
Date:	Thu, 03 Dec 2009 22:12:36 +0200
From:	Adrian Hunter <adrian.hunter@...ia.com>
To:	Daniel Mack <daniel@...aq.de>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	Liam Girdwood <lrg@...mlogic.co.uk>,
	Pierre Ossman <pierre@...man.eu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Matt Fleming <matt@...sole-pimps.org>,
	David Brownell <dbrownell@...rs.sourceforge.net>,
	Russell King <rmk+kernel@....linux.org.uk>,
	Linus Walleij <linus.walleij@...ricsson.com>,
	Eric Miao <eric.y.miao@...il.com>,
	Robert Jarzmik <robert.jarzmik@...e.fr>,
	Cliff Brake <cbrake@...-systems.com>,
	"Lavinen Jarkko (Nokia-D/Helsinki)" <jarkko.lavinen@...ia.com>,
	"linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"madhu.cr@...com >> Madhusudhan Chikkature" <madhu.cr@...com>
Subject: Re: [PATCH] mmc: move regulator handling to core

Daniel Mack wrote:
> On Thu, Dec 03, 2009 at 04:27:39PM +0200, Adrian Hunter wrote:
>> gDaniel Mack wrote:
> 
> [...]
> 
>>> drivers/mmc/core/core.c   |   36 ++++++++++++++++++++----------------
>>> drivers/mmc/core/host.c   |    3 +++
>>> drivers/mmc/host/mmci.c   |   28 ++++++++++++----------------
>>> drivers/mmc/host/mmci.h   |    1 -
>>> drivers/mmc/host/pxamci.c |   20 ++++++++------------
>>> include/linux/mmc/host.h  |   10 ++++++----
>> What about arch/arm/mach-omap2/mmc-twl4030.c ?
> 
> Argh, missed that one. And this particular case doesn't fit to my
> modifications. I don't know the code well ...  We would need to
> have a struct mmc_host * in all the functions there calling
> mmc_regulator_{set,get}_ocr. Any idea how to resolve that?
> 

Pass it down from the omap_hsmmc driver.

>>> --- a/drivers/mmc/core/host.c
>>> +++ b/drivers/mmc/core/host.c
>>> @@ -18,6 +18,7 @@
>>> #include <linux/leds.h>
>>> #include <linux/mmc/host.h>
>>> +#include <linux/regulator/consumer.h>
>>> #include "core.h"
>>> #include "host.h"
>>> @@ -154,6 +155,8 @@ void mmc_remove_host(struct mmc_host *host)
>>> 	mmc_remove_host_debugfs(host);
>>> #endif
>>> +	regulator_put(host->vcc);
>>> +
>> If the core is doing a 'regulator_put()' shouldn't it also be doing
>> a 'regulator_get()'?  Why not leave it to the drivers?
> 
> Yes, I can change the patch to do that, no problem. The major reason why
> I didn't put the regulator_get() to the mmc core is that I need to have
> the platform_device to obtain its name.
> 
> Daniel
> 
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ