kbdleds.h 454 B

123456789101112131415161718
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _ASM_X86_KBDLEDS_H
  3. #define _ASM_X86_KBDLEDS_H
  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. #include <asm/setup.h>
  10. static inline int kbd_defleds(void)
  11. {
  12. return boot_params.kbd_status & 0x20 ? (1 << VC_NUMLOCK) : 0;
  13. }
  14. #endif /* _ASM_X86_KBDLEDS_H */