summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJian-Hong Pan <jian-hong@endlessm.com>2019-12-30 16:30:45 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-23 08:18:37 +0100
commit0ea98e08aef3b500a8bbbb40cca226d3ba13098f (patch)
tree8d61a46244de680f095b60cabdb28b632c6657f0
parent4b8b57d7e7031cb5a59f6fc08955dca2d095466c (diff)
downloadlinux-stable-0ea98e08aef3b500a8bbbb40cca226d3ba13098f.tar.gz
linux-stable-0ea98e08aef3b500a8bbbb40cca226d3ba13098f.tar.bz2
linux-stable-0ea98e08aef3b500a8bbbb40cca226d3ba13098f.zip
platform/x86: asus-wmi: Fix keyboard brightness cannot be set to 0
commit 176a7fca81c5090a7240664e3002c106d296bf31 upstream. Some of ASUS laptops like UX431FL keyboard backlight cannot be set to brightness 0. According to ASUS' information, the brightness should be 0x80 ~ 0x83. This patch fixes it by following the logic. Fixes: e9809c0b9670 ("asus-wmi: add keyboard backlight support") Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com> Reviewed-by: Daniel Drake <drake@endlessm.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/platform/x86/asus-wmi.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index 63b5b6838e8b..ca1d507aa532 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -452,13 +452,7 @@ static void kbd_led_update(struct work_struct *work)
asus = container_of(work, struct asus_wmi, kbd_led_work);
- /*
- * bits 0-2: level
- * bit 7: light on/off
- */
- if (asus->kbd_led_wk > 0)
- ctrl_param = 0x80 | (asus->kbd_led_wk & 0x7F);
-
+ ctrl_param = 0x80 | (asus->kbd_led_wk & 0x7F);
asus_wmi_set_devstate(ASUS_WMI_DEVID_KBD_BACKLIGHT, ctrl_param, NULL);
}