From: Markus Pargmann <mpa@pengutronix.de>
To: Mark Brown <broonie@kernel.org>
Cc: "Liam Girdwood" <lgirdwood@gmail.com>,
"Krzysztof Kozłowski" <k.kozlowski@samsung.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, kernel@pengutronix.de,
"Markus Pargmann" <mpa@pengutronix.de>
Subject: [PATCH v3 3/4] regulator: gpio: Use gpio_is_valid
Date: Mon, 3 Nov 2014 19:12:06 +0100 [thread overview]
Message-ID: <1415038327-32616-4-git-send-email-mpa@pengutronix.de> (raw)
In-Reply-To: <1415038327-32616-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/gpio-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/gpio-regulator.c b/drivers/regulator/gpio-regulator.c
index 5da0125fac6a..86546c1c32c4 100644
--- a/drivers/regulator/gpio-regulator.c
+++ b/drivers/regulator/gpio-regulator.c
@@ -322,7 +322,7 @@ static int gpio_regulator_probe(struct platform_device *pdev)
cfg.driver_data = drvdata;
cfg.of_node = np;
- if (config->enable_gpio >= 0) {
+ if (gpio_is_valid(config->enable_gpio)) {
cfg.ena_gpio = config->enable_gpio;
cfg.ena_gpio_initialized = true;
}
--
2.1.1
next prev parent reply other threads:[~2014-11-03 18:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-03 18:12 [PATCH v3 0/4] regulator: Fix core behaviour for gpio 0, remaining patches Markus Pargmann
2014-11-03 18:12 ` [PATCH v3 1/4] regulator: Set ena_gpio_initialized in regulator drivers Markus Pargmann
2014-11-03 18:12 ` [PATCH v3 2/4] regulator: fixed: Use gpio_is_valid Markus Pargmann
2014-11-03 18:12 ` Markus Pargmann [this message]
2014-11-03 18:12 ` [PATCH v3 4/4] regulator: tps65090: Fix gpio initialization Markus Pargmann
2014-11-07 11:30 ` [PATCH v3 0/4] regulator: Fix core behaviour for gpio 0, remaining patches Mark Brown
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=1415038327-32616-4-git-send-email-mpa@pengutronix.de \
--to=mpa@pengutronix.de \
--cc=broonie@kernel.org \
--cc=k.kozlowski@samsung.com \
--cc=kernel@pengutronix.de \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®