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>
This commit is contained in:
Markus Pargmann 2014-11-03 19:12:05 +01:00 committed by Mark Brown
parent 1de3821ace
commit 5315fe2f8d
1 changed files with 1 additions and 1 deletions

View File

@ -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;
if (pdev->dev.of_node)
cfg.ena_gpio_initialized = true;