Skip to contentSkip to conversation

leds: gpio: switch to using devm_fwnode_gpiod_get()

PATCH New Dmitry Torokhov 1 participant 1 message Jan 3, 2020 LED

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 leds: gpio: switch to using devm_fwnode_gpiod_get()

devm_fwnode_get_gpiod_from_child() is going away as the name is too unwieldy, let's switch to using the new devm_fwnode_gpiod_get().

---
 drivers/leds/leds-gpio.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/leds/leds-gpio.c +2 -3
index a5c73f3d5f797..f57f33008f4f3 100644
@@ -151,9 +151,8 @@ static struct gpio_leds_priv *gpio_leds_create(struct platform_device *pdev)
 		struct gpio_led led = {};
 		const char *state = NULL;
 
-		led.gpiod = devm_fwnode_get_gpiod_from_child(dev, NULL, child,
-							     GPIOD_ASIS,
-							     led.name);
+		led.gpiod = devm_fwnode_gpiod_get(dev, child, NULL, GPIOD_ASIS,
+						  led.name);
 		if (IS_ERR(led.gpiod)) {
 			fwnode_handle_put(child);
 			return ERR_CAST(led.gpiod);
Signature · 5 lines
2.24.1.735.g03f4e72817-goog


-- 
Dmitry