projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5315fe2
)
regulator: gpio: Use gpio_is_valid
author
Markus Pargmann
<mpa@pengutronix.de>
Mon, 3 Nov 2014 18:12:06 +0000
(19:12 +0100)
committer
Mark Brown
<broonie@kernel.org>
Fri, 7 Nov 2014 11:30:25 +0000
(11:30 +0000)
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>
drivers/regulator/gpio-regulator.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/regulator/gpio-regulator.c
b/drivers/regulator/gpio-regulator.c
index 5da0125fac6ad50655fb231b72e3439289c26c93..86546c1c32c480cfdc2ccbc949e60f69f93301bd 100644
(file)
--- a/
drivers/regulator/gpio-regulator.c
+++ b/
drivers/regulator/gpio-regulator.c
@@
-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;
}