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: Wed, 8 Oct 2014 15:47:07 +0200 [thread overview]
Message-ID: <1412776028-15655-4-git-send-email-mpa@pengutronix.de> (raw)
In-Reply-To: <1412776028-15655-1-git-send-email-mpa@pengutronix.de>
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)) {
cfg.ena_gpio = config->gpio;
cfg.ena_gpio_initialized = true;
}
--
2.1.0
next prev parent reply other threads:[~2014-10-08 13:47 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 ` Markus Pargmann [this message]
2014-10-13 14:47 ` [PATCH v2 3/4] regulator: fixed: Use gpio_is_valid Mark Brown
2014-11-03 13:38 ` Markus Pargmann
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=1412776028-15655-4-git-send-email-mpa@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).