diff options
author | Joshua Cov <joshuacov@googlemail.com> | 2012-04-13 23:08:26 +0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2012-05-09 01:19:41 +0400 |
commit | b2d0b7a061bfddd27155c7dcd53f365d9dc0c7c3 (patch) | |
tree | 8063c6df479723b7adc509ee2aad728889faa9a4 /arch/parisc/include | |
parent | c2c21e9bb17549e8add4ff76931bcec2e2d3ad48 (diff) | |
download | linux-b2d0b7a061bfddd27155c7dcd53f365d9dc0c7c3.tar.xz |
keyboard: Use BIOS Keyboard variable to set Numlock
The PC BIOS does provide a NUMLOCK flag containing the desired state
of this LED. This patch sets the current state according to the data
in the bios.
[ hpa: fixed __weak declaration without definition, changed "inline"
to "static inline" ]
Signed-Off-By: Joshua Cov <joshuacov@googlemail.com>
Link: http://lkml.kernel.org/r/CAKL7Q7rvq87TNS1T_Km8fW_5OzS%2BSbYazLXKxW-6ztOxo3zorg@mail.gmail.com
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/parisc/include')
-rw-r--r-- | arch/parisc/include/asm/kbdleds.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/parisc/include/asm/kbdleds.h b/arch/parisc/include/asm/kbdleds.h new file mode 100644 index 000000000000..2e2e75a83c28 --- /dev/null +++ b/arch/parisc/include/asm/kbdleds.h @@ -0,0 +1,19 @@ +#ifndef _ASM_PARISC_KBDLEDS_H +#define _ASM_PARISC_KBDLEDS_H + +/* + * On HIL keyboards of PARISC machines there is no NumLock key and + * everyone expects the keypad to be used for numbers. That's why + * we can safely turn on the NUMLOCK bit. + */ + +static inline int kbd_defleds(void) +{ +#if defined(CONFIG_KEYBOARD_HIL) || defined(CONFIG_KEYBOARD_HIL_OLD) + return 1 << VC_NUMLOCK; +#else + return 0; +#endif +} + +#endif /* _ASM_PARISC_KBDLEDS_H */ |