diff options
Diffstat (limited to 'drivers/leds/leds.h')
-rw-r--r-- | drivers/leds/leds.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/leds/leds.h b/drivers/leds/leds.h index 2348dbda526..79efe57c740 100644 --- a/drivers/leds/leds.h +++ b/drivers/leds/leds.h @@ -20,7 +20,8 @@ static inline void led_set_brightness_async(struct led_classdev *led_cdev, enum led_brightness value) { - led_cdev->brightness = min(value, led_cdev->max_brightness); + value = min(value, led_cdev->max_brightness); + led_cdev->brightness = value; if (!(led_cdev->flags & LED_SUSPENDED)) led_cdev->brightness_set(led_cdev, value); |