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

View File

@ -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;
}