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: <1387378632.1433.4.camel@AMDC1943>
Date:	Wed, 18 Dec 2013 15:57:12 +0100
From:	Krzysztof Kozlowski <k.kozlowski@...sung.com>
To:	Mark Brown <broonie@...nel.org>
Cc:	Rob Herring <rob.herring@...xeda.com>,
	Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	Rob Landley <rob@...dley.net>,
	Sangbeom Kim <sbkim73@...sung.com>,
	Samuel Ortiz <sameo@...ux.intel.com>,
	Lee Jones <lee.jones@...aro.org>,
	Liam Girdwood <lgirdwood@...il.com>,
	Grant Likely <grant.likely@...aro.org>,
	Sachin Kamat <sachin.kamat@...aro.org>,
	Thomas Abraham <thomas.abraham@...aro.org>,
	Amit Daniel Kachhap <amit.daniel@...sung.com>,
	devicetree@...r.kernel.org, linux-doc@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Kyungmin Park <kyungmin.park@...sung.com>,
	Marek Szyprowski <m.szyprowski@...sung.com>
Subject: Re: [PATCH 4/5] regulator: s5m8767: Use GPIO for controlling Buck9/eMMC

On Wed, 2013-12-18 at 13:47 +0000, Mark Brown wrote:
> On Tue, Dec 17, 2013 at 02:23:20PM +0100, Krzysztof Kozlowski wrote:
> 
> > +static int s5m8767_reg_gpio_is_enabled(struct regulator_dev *rdev)
> > +{
> > +	struct s5m8767_info *s5m8767 = rdev_get_drvdata(rdev);
> > +	int val;
> > +
> > +	if (!s5m8767->buck9_uses_gpio)
> > +		return s5m8767_reg_is_enabled(rdev);
> > +
> > +	val = gpio_get_value(s5m8767->buck9_gpio);
> > +
> > +	return val == 1;
> > +}
> 
> Don't open code this, use the core GPIO handling - see ena_gpio.

OK, I'll rewrite the patch.

Best regards,
Krzysztof

--
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