mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
b2d0b7a061
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>
18 lines
415 B
C
18 lines
415 B
C
#ifndef _ASM_X86_KBDLEDS_H
|
|
#define _ASM_X86_KBDLEDS_H
|
|
|
|
/*
|
|
* Some laptops take the 789uiojklm,. keys as number pad when NumLock is on.
|
|
* This seems a good reason to start with NumLock off. That's why on X86 we
|
|
* ask the bios for the correct state.
|
|
*/
|
|
|
|
#include <asm/setup.h>
|
|
|
|
static inline int kbd_defleds(void)
|
|
{
|
|
return boot_params.kbd_status & 0x20 ? (1 << VC_NUMLOCK) : 0;
|
|
}
|
|
|
|
#endif /* _ASM_X86_KBDLEDS_H */
|