diff options
author | Krzysztof Kozlowski | 2018-12-07 13:32:52 +0100 |
---|---|---|
committer | Jacek Anaszewski | 2018-12-08 18:59:47 +0100 |
commit | cb14e6d6d8f411b7a05f36d1f877450c036d8c56 (patch) | |
tree | d0207472f8dbf66d387c48d8de60b6556bb27fe5 /drivers | |
parent | e5a0436dd08a18834c134ffd08295e36c6f85219 (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/leds/leds-pwm.c | 2 |
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); |