mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
regulator: fixed: Use gpio_is_valid
Use gpio_is_valid instead of an explicit comparison with 0. Signed-off-by: Markus Pargmann <[email protected]> Signed-off-by: Mark Brown <[email protected]>
This commit is contained in:
parent
1de3821ace
commit
5315fe2f8d
1 changed files with 1 additions and 1 deletions
|
|
@ -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 a new issue