HID: asus: Remove check for same LED brightness on set
authorLuke D. Jones <luke@ljones.dev>
Sun, 4 Jul 2021 22:26:59 +0000 (10:26 +1200)
committerJiri Kosina <jkosina@suse.cz>
Thu, 15 Jul 2021 19:01:32 +0000 (21:01 +0200)
Remove the early return on LED brightness set so that any controller
application, daemon, or desktop may set the same brightness at any stage.

This is required because many ASUS ROG keyboards will default to max
brightness on laptop resume if the LEDs were set to off before sleep.

Signed-off-by: Luke D Jones <luke@ljones.dev>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-asus.c

index fca8fc78a78a310449601c9ed4c7aec66477cd47..fb807c8e989bf0dd32cada69c2c1c95072f4d079 100644 (file)
@@ -485,9 +485,6 @@ static void asus_kbd_backlight_set(struct led_classdev *led_cdev,
 {
        struct asus_kbd_leds *led = container_of(led_cdev, struct asus_kbd_leds,
                                                 cdev);
-       if (led->brightness == brightness)
-               return;
-
        led->brightness = brightness;
        schedule_work(&led->work);
 }