OSDN Git Service

platform/x86: asus-wmi: Only notify kbd LED hw_change by fn-key pressed
authorJian-Hong Pan <jian-hong@endlessm.com>
Mon, 22 Oct 2018 10:00:04 +0000 (18:00 +0800)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 31 Oct 2018 14:11:40 +0000 (16:11 +0200)
commit29f6eb533c3be9b9c74cdeacc7bf14d927a8adb4
tree86d2f3c322860e177486009d1391bdc37e5ad6d8
parent69372c1dbdee8cab3c3892eda932c624af59a494
platform/x86: asus-wmi: Only notify kbd LED hw_change by fn-key pressed

Since commit dbb3d78f61ba ("platform/x86: asus-wmi: Call led hw_changed
API on kbd brightness change"), asus-wmi directly changes the keyboard
LED brightness when the keyboard brightness keys are pressed,
raising the appropriate notification.

However, this notification was unintentionally also being raised during
boot and resume from suspend. This was resulting in userspace showing
the keyboard LED OSD on resume for no good reason.

Move the keyboard LED brightness changed notification
from kbd_led_update to the new kbd_led_set_by_kbd function which is only
called from the keyboard brightness function keys codepath.

Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
Signed-off-by: Daniel Drake <drake@endlessm.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/asus-wmi.c