diff options
author | Markus Pargmann <mpa@pengutronix.de> | 2014-11-03 19:12:06 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-11-07 11:30:25 +0000 |
commit | 2454f8d15cf75781a2714e99badbfbc2f5a7dacb (patch) | |
tree | 50d3882bba91b6138a3ed13d873b10157e7f25d9 /drivers/regulator/gpio-regulator.c | |
parent | 5315fe2f8defc012a5800423be3f6098f95527d7 (diff) | |
download | linux-2454f8d15cf75781a2714e99badbfbc2f5a7dacb.tar.gz linux-2454f8d15cf75781a2714e99badbfbc2f5a7dacb.tar.bz2 linux-2454f8d15cf75781a2714e99badbfbc2f5a7dacb.zip |
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.c | 2 |
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; } |