diff options
author | Yurii Pavlovskyi | 2019-05-14 21:07:46 +0200 |
---|---|---|
committer | Andy Shevchenko | 2019-06-17 15:22:47 +0300 |
commit | 3e58167ac3703c9b15a8600ab559d239f3d4dd97 (patch) | |
tree | 48eb0154e3cf5f5a79e26ed94446908e46b10a12 /drivers/platform | |
parent | b096f626a6827ad2ced5ebdbdc04e62422d463f6 (diff) |
platform/x86: asus-wmi: Do not disable keyboard backlight on unloading
The keyboard backlight is automatically disabled when the module is
unloaded as it is exposed as a ledclass device. Change this behavior to
ignore setting brightness when the device is in unloading state.
Signed-off-by: Yurii Pavlovskyi <yurii.pavlovskyi@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/asus-wmi.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c index 5712bc56fa10..508e6ad47793 100644 --- a/drivers/platform/x86/asus-wmi.c +++ b/drivers/platform/x86/asus-wmi.c @@ -471,6 +471,10 @@ static void do_kbd_led_set(struct led_classdev *led_cdev, int value) static void kbd_led_set(struct led_classdev *led_cdev, enum led_brightness value) { + /* Prevent disabling keyboard backlight on module unregister */ + if (led_cdev->flags & LED_UNREGISTERING) + return; + do_kbd_led_set(led_cdev, value); } |