summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzk@kernel.org>2018-12-07 13:32:52 +0100
committerJacek Anaszewski <jacek.anaszewski@gmail.com>2018-12-08 18:59:47 +0100
commitcb14e6d6d8f411b7a05f36d1f877450c036d8c56 (patch)
treed0207472f8dbf66d387c48d8de60b6556bb27fe5
parente5a0436dd08a18834c134ffd08295e36c6f85219 (diff)
downloadlinux-cb14e6d6d8f411b7a05f36d1f877450c036d8c56.tar.bz2
leds: pwm: Use OF variant of LED registering function
The PWM leds can be instantiated from Device Tree so pass the respective device node to LED core. This provides the LED system with proper device node and exposes it through uevent. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
-rw-r--r--drivers/leds/leds-pwm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/leds/leds-pwm.c b/drivers/leds/leds-pwm.c
index fcb3e87a9887..af08bcdc4fd8 100644
--- a/drivers/leds/leds-pwm.c
+++ b/drivers/leds/leds-pwm.c
@@ -114,7 +114,7 @@ static int led_pwm_add(struct device *dev, struct led_pwm_priv *priv,
if (!led_data->period && (led->pwm_period_ns > 0))
led_data->period = led->pwm_period_ns;
- ret = devm_led_classdev_register(dev, &led_data->cdev);
+ ret = devm_of_led_classdev_register(dev, child, &led_data->cdev);
if (ret == 0) {
priv->num_leds++;
led_pwm_set(&led_data->cdev, led_data->cdev.brightness);