Commit 2454f8d1 authored by Markus Pargmann's avatar Markus Pargmann Committed by Mark Brown

regulator: gpio: Use gpio_is_valid

Use gpio_is_valid instead of an explicit comparison with 0.
Signed-off-by: default avatarMarkus Pargmann <mpa@pengutronix.de>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 5315fe2f
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment