aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/kbdleds.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/include/asm/kbdleds.h')
-rw-r--r--arch/x86/include/asm/kbdleds.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/x86/include/asm/kbdleds.h b/arch/x86/include/asm/kbdleds.h
new file mode 100644
index 000000000000..f27ac5ff597d
--- /dev/null
+++ b/arch/x86/include/asm/kbdleds.h
@@ -0,0 +1,17 @@
1#ifndef _ASM_X86_KBDLEDS_H
2#define _ASM_X86_KBDLEDS_H
3
4/*
5 * Some laptops take the 789uiojklm,. keys as number pad when NumLock is on.
6 * This seems a good reason to start with NumLock off. That's why on X86 we
7 * ask the bios for the correct state.
8 */
9
10#include <asm/setup.h>
11
12static inline int kbd_defleds(void)
13{
14 return boot_params.kbd_status & 0x20 ? (1 << VC_NUMLOCK) : 0;
15}
16
17#endif /* _ASM_X86_KBDLEDS_H */