mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
leds: gpio: set led_dat->gpiod pointer for OF defined GPIO leds
Commit45d4c6de4e("leds: gpio: Try to lookup gpiod from device") removed the common code path that set the led_dat->gpiod pointer in create_gpio_led(), but only added it back for the devices that have a valid gpio_led_platform_data structure. Calling gpio_leds_create() in gpio_led_probe() is not enough to get a valid gpiod pointer. Fortunately enough, gpio_leds_create() already gets the needed pointer, we just need to assign it to the relevant gpio_led_data structure. Fixes:45d4c6de4e("leds: gpio: Try to lookup gpiod from device") Signed-off-by: Liviu Dudau <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Acked-by: Pavel Machek <[email protected]> Signed-off-by: Jacek Anaszewski <[email protected]>
This commit is contained in:
parent
8dbac65f5c
commit
72b8ad40e1
1 changed files with 2 additions and 0 deletions
|
|
@ -163,6 +163,8 @@ static struct gpio_leds_priv *gpio_leds_create(struct platform_device *pdev)
|
|||
return ERR_CAST(led.gpiod);
|
||||
}
|
||||
|
||||
led_dat->gpiod = led.gpiod;
|
||||
|
||||
fwnode_property_read_string(child, "linux,default-trigger",
|
||||
&led.default_trigger);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue