From: mpa@pengutronix.de (Markus Pargmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 3/4] regulator: fixed: Use gpio_is_valid
Date: Mon, 3 Nov 2014 14:38:40 +0100 [thread overview]
Message-ID: <20141103133840.GF24292@pengutronix.de> (raw)
In-Reply-To: <20141013144733.GK27755@sirena.org.uk>
On Mon, Oct 13, 2014 at 04:47:33PM +0200, Mark Brown wrote:
> On Wed, Oct 08, 2014 at 03:47:07PM +0200, Markus Pargmann wrote:
> > Use gpio_is_valid instead of an explicit comparison with 0.
> >
> > Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
> > ---
> > drivers/regulator/fixed.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c
> > index 441a3e90e266..696f53cc1927 100644
> > --- a/drivers/regulator/fixed.c
> > +++ b/drivers/regulator/fixed.c
> > @@ -157,7 +157,7 @@ static int reg_fixed_voltage_probe(struct platform_device *pdev)
> >
> > drvdata->desc.fixed_uV = config->microvolts;
> >
> > - if (config->gpio >= 0) {
> > + if (gpio_is_valid(config->gpio)) {
>
> Have you audited all users to ensure that they don't rely on zero being
> ignored? Right now we're sharing the core behaviour here so the same
> issues apply to this platform data as apply to the core.
For all other drivers this should be fine (just rechecked again). But
the fixed regulator driver patch has this problem.
Thanks,
Markus
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141103/4fa6afdc/attachment.sig>
next prev parent reply other threads:[~2014-11-03 13:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-08 13:47 [PATCH v2 0/4] regulator: Fix core behaviour for gpio 0 Markus Pargmann
2014-10-08 13:47 ` [PATCH v2 1/4] regulator: Add ena_gpio_initialized to regulator_config Markus Pargmann
2014-10-13 14:49 ` Mark Brown
2014-10-08 13:47 ` [PATCH v2 2/4] regulator: Set ena_gpio_initialized in regulator drivers Markus Pargmann
2014-10-08 14:53 ` Krzysztof Kozlowski
2014-10-10 6:00 ` Markus Pargmann
2014-10-13 14:42 ` Mark Brown
2014-11-03 13:22 ` Markus Pargmann
2014-10-08 13:47 ` [PATCH v2 3/4] regulator: fixed: Use gpio_is_valid Markus Pargmann
2014-10-13 14:47 ` Mark Brown
2014-11-03 13:38 ` Markus Pargmann [this message]
2014-10-08 13:47 ` [PATCH v2 4/4] regulator: gpio: " Markus Pargmann
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=20141103133840.GF24292@pengutronix.de \
--to=mpa@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
/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).