leds: trigger: gpio: Replace custom code for gpiod_get_optional()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 3 Nov 2023 19:53:07 +0000 (21:53 +0200)
committerLee Jones <lee@kernel.org>
Wed, 13 Dec 2023 11:28:36 +0000 (11:28 +0000)
commit9bbd6b7209cf1e26390975b7617a29901c8990a1
tree861327f36f44bca4c527ce4a770433b33ed6d5ba
parent75469bb0537ad2ab0fc1fb6e534a79cfc03f3b3f
leds: trigger: gpio: Replace custom code for gpiod_get_optional()

gpiod_get_optional() and currently used fwnode_gpiod_get_index()
are both wrappers against the same engine internally. Since we
have a pointer to struct device there is no reason to use fwnode
type of GPIO call. So, replace the current fwnode call by respective
gpiod ones.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20231103195310.948327-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/leds/trigger/ledtrig-gpio.c