mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-18 01:34:14 +08:00
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:
parent
1de3821ace
commit
5315fe2f8d
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user