]> git.baikalelectronics.ru Git - kernel.git/commitdiff
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 11 Mar 2023 15:43:31 +0000 (16:43 +0100)
commit 094ca9075e8b8af73e8dcf81ca7edb304cc86a83 upstream.

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>
Signed-off-by: Stefan Ghinea <stefan.ghinea@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hid/hid-asus.c

index 7f84ed0afdfef9d5babb34ba8da59fce482aacf7..d3aca8f80de48af82c644bd5abce24fa730e9e90 100644 (file)
@@ -351,9 +351,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);
 }