aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/dell-wmi.c
diff options
context:
space:
mode:
authorGabriele Mazzotta <gabriele.mzt@gmail.com>2014-12-03 18:16:23 -0500
committerDarren Hart <dvhart@linux.intel.com>2014-12-03 13:10:16 -0500
commit8cb8e63b5698954877071b7a0d259b7c4c9040dc (patch)
tree446cfc427ceb3a5ff20a3f4cbd2ea0c1245f41a2 /drivers/platform/x86/dell-wmi.c
parent8f8d75ebf075001485d787a4429ba15b1dd8dd7a (diff)
dell-wmi: Don't report keypresses on keybord illumination change
Keyboard illumination level changes are performed by the BIOS, so no events should be reported on keypress. This is already done on systems using the legacy keymap, do it also for systems that don't use it. Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>
Diffstat (limited to 'drivers/platform/x86/dell-wmi.c')
-rw-r--r--drivers/platform/x86/dell-wmi.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c
index 4c2a44da2fff..6512a06bc053 100644
--- a/drivers/platform/x86/dell-wmi.c
+++ b/drivers/platform/x86/dell-wmi.c
@@ -308,11 +308,16 @@ static const struct key_entry * __init dell_wmi_prepare_new_keymap(void)
308 for (i = 0; i < hotkey_num; i++) { 308 for (i = 0; i < hotkey_num; i++) {
309 const struct dell_bios_keymap_entry *bios_entry = 309 const struct dell_bios_keymap_entry *bios_entry =
310 &dell_bios_hotkey_table->keymap[i]; 310 &dell_bios_hotkey_table->keymap[i];
311 keymap[i].type = KE_KEY; 311 u16 keycode = bios_entry->keycode < 256 ?
312 keymap[i].code = bios_entry->scancode;
313 keymap[i].keycode = bios_entry->keycode < 256 ?
314 bios_to_linux_keycode[bios_entry->keycode] : 312 bios_to_linux_keycode[bios_entry->keycode] :
315 KEY_RESERVED; 313 KEY_RESERVED;
314
315 if (keycode == KEY_KBDILLUMTOGGLE)
316 keymap[i].type = KE_IGNORE;
317 else
318 keymap[i].type = KE_KEY;
319 keymap[i].code = bios_entry->scancode;
320 keymap[i].keycode = keycode;
316 } 321 }
317 322
318 keymap[hotkey_num].type = KE_END; 323 keymap[hotkey_num].type = KE_END;