mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
b096f626a6
commit
3e58167ac3
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue