summaryrefslogtreecommitdiff
path: root/drivers/regulator/gpio-regulator.c
diff options
context:
space:
mode:
authorMarkus Pargmann <mpa@pengutronix.de>2014-11-03 19:12:06 +0100
committerMark Brown <broonie@kernel.org>2014-11-07 11:30:25 +0000
commit2454f8d15cf75781a2714e99badbfbc2f5a7dacb (patch)
tree50d3882bba91b6138a3ed13d873b10157e7f25d9 /drivers/regulator/gpio-regulator.c
parent5315fe2f8defc012a5800423be3f6098f95527d7 (diff)
regulator: gpio: Use gpio_is_valid
Use gpio_is_valid instead of an explicit comparison with 0. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/gpio-regulator.c')
-rw-r--r--drivers/regulator/gpio-regulator.c2
1 files changed, 1 insertions, 1 deletions
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;
}