You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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>
This commit is contained in:
committed by
H. Peter Anvin
parent
c2c21e9bb1
commit
b2d0b7a061
@@ -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 */
|
||||
Reference in New Issue
Block a user