Set default led brightness when probing new leds. Signed-off-by: Boris BREZILLON <linux-arm@xxxxxxxxxxx> diff --git a/drivers/leds/leds-pwm.c b/drivers/leds/leds-pwm.c index 492ac22..71aee2c 100644 --- a/drivers/leds/leds-pwm.c +++ b/drivers/leds/leds-pwm.c @@ -141,6 +141,8 @@ static int led_pwm_probe(struct platform_device *pdev) led_dat->cdev.max_brightness = cur_led->max_brightness; led_dat->cdev.flags |= LED_CORE_SUSPENDRESUME; + led_pwm_set(&led_dat->cdev, led_dat->cdev.brightness); + ret = led_classdev_register(&pdev->dev, &led_dat->cdev); if (ret < 0) goto err; -- 1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-leds" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html