Skip to content
Commit 72b8ad40 authored by Liviu Dudau's avatar Liviu Dudau Committed by Jacek Anaszewski
Browse files

leds: gpio: set led_dat->gpiod pointer for OF defined GPIO leds



Commit 45d4c6de ("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: 45d4c6de ("leds: gpio: Try to lookup gpiod from device")
Signed-off-by: default avatarLiviu Dudau <liviu@dudau.co.uk>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Acked-by: default avatarPavel Machek <pavel@ucw.cz>
Signed-off-by: default avatarJacek Anaszewski <jacek.anaszewski@gmail.com>
parent 8dbac65f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment