Commit 5315fe2f authored by Markus Pargmann's avatar Markus Pargmann Committed by Mark Brown

regulator: fixed: 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 1de3821a
......@@ -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;
......
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