summaryrefslogtreecommitdiff
path: root/drivers/leds
diff options
context:
space:
mode:
authorMarkuss Broks <markuss.broks@gmail.com>2022-05-05 18:25:18 +0300
committerPavel Machek <pavel@ucw.cz>2022-05-07 23:12:19 +0200
commit69175786d5bc81da7cc8baab92f1ac0b07567dba (patch)
tree587ad64e6f8392016766e6333b5cf55afaad3fbb /drivers/leds
parent92db043f030225f1fbfdbe105db7ac2b8a420068 (diff)
leds: ktd2692: Make aux-gpios optional
Make the AUX pin optional, since it isn't a core part of functionality, and the device is designed to be operational with only one CTRL pin. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Markuss Broks <markuss.broks@gmail.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
Diffstat (limited to 'drivers/leds')
-rw-r--r--drivers/leds/flash/leds-ktd2692.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/leds/flash/leds-ktd2692.c b/drivers/leds/flash/leds-ktd2692.c
index 8b99742cb68a..670f3bf2e906 100644
--- a/drivers/leds/flash/leds-ktd2692.c
+++ b/drivers/leds/flash/leds-ktd2692.c
@@ -282,9 +282,8 @@ static int ktd2692_parse_dt(struct ktd2692_context *led, struct device *dev,
if (ret)
return dev_err_probe(dev, ret, "cannot get ctrl-gpios\n");
- led->aux_gpio = devm_gpiod_get(dev, "aux", GPIOD_ASIS);
- ret = PTR_ERR_OR_ZERO(led->aux_gpio);
- if (ret)
+ led->aux_gpio = devm_gpiod_get_optional(dev, "aux", GPIOD_ASIS);
+ if (IS_ERR(led->aux_gpio))
return dev_err_probe(dev, PTR_ERR(led->aux_gpio), "cannot get aux-gpios\n");
led->regulator = devm_regulator_get(dev, "vin");