]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit84addaa41fc0af3dd16ca1c82e3e1af64f03cfcb
tree86d2f3c322860e177486009d1391bdc37e5ad6d8
parent26ff76f0d48706647464137fa1c6ede235e5e403
platform/x86: asus-wmi: Only notify kbd LED hw_change by fn-key pressed

Since commit 8703685cd7d0 ("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