aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Pargmann <mpa@pengutronix.de>2014-11-03 13:12:05 -0500
committerMark Brown <broonie@kernel.org>2014-11-07 06:30:25 -0500
commit5315fe2f8defc012a5800423be3f6098f95527d7 (patch)
treedbd57667eaf2182e80583023d0d41a6695ef02e6
parent1de3821ace8200432993821bfda043827029de2a (diff)
regulator: fixed: 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>
-rw-r--r--drivers/regulator/fixed.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c
index 17f6a7d331f8..709fba19e596 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)
157 157
158 drvdata->desc.fixed_uV = config->microvolts; 158 drvdata->desc.fixed_uV = config->microvolts;
159 159
160 if (config->gpio >= 0) { 160 if (gpio_is_valid(config->gpio)) {
161 cfg.ena_gpio = config->gpio; 161 cfg.ena_gpio = config->gpio;
162 if (pdev->dev.of_node) 162 if (pdev->dev.of_node)
163 cfg.ena_gpio_initialized = true; 163 cfg.ena_gpio_initialized = true;