patch-2.4.14 linux/drivers/acorn/char/keyb_ps2.c
Next file: linux/drivers/acorn/scsi/cumana_2.c
Previous file: linux/drivers/acorn/block/mfmhd.c
Back to the patch index
Back to the overall index
- Lines: 59
- Date:
Thu Oct 25 13:53:46 2001
- Orig file:
v2.4.13/linux/drivers/acorn/char/keyb_ps2.c
- Orig date:
Tue Jul 3 17:08:19 2001
diff -u --recursive --new-file v2.4.13/linux/drivers/acorn/char/keyb_ps2.c linux/drivers/acorn/char/keyb_ps2.c
@@ -30,6 +30,7 @@
#include <asm/bitops.h>
#include <asm/irq.h>
#include <asm/hardware.h>
+#include <asm/keyboard.h>
#include <asm/io.h>
#include <asm/hardware/iomd.h>
#include <asm/system.h>
@@ -212,7 +213,7 @@
};
#ifdef CONFIG_MAGIC_SYSRQ
-unsigned char ps2kbd_sysrq_xlate[] =
+static unsigned char ps2kbd_sysrq_xlate[] =
{
27, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
@@ -360,7 +361,7 @@
status = 0;
}
-void ps2kbd_leds(unsigned int leds)
+static void ps2kbd_leds(unsigned char leds)
{
ps2kbd_sendbyte(KBD_SETLEDS);
ps2kbd_sendbyte(leds);
@@ -380,6 +381,17 @@
{
}
+static int ps2kbd_translate(unsigned char scancode, unsigned char *keycode, char rawmode)
+{
+ *keycode = scancode;
+ return 1;
+}
+
+static char ps2kbd_unexpected_up(unsigned char scancode)
+{
+ return 0200;
+}
+
int __init ps2kbd_init_hw(void)
{
/* Reset the keyboard state machine. */
@@ -391,6 +403,14 @@
panic("Could not allocate keyboard receive IRQ!");
if (request_irq (IRQ_KEYBOARDTX, ps2kbd_tx, 0, "keyboard", NULL) != 0)
panic("Could not allocate keyboard transmit IRQ!");
+
+ k_translate = ps2kbd_translate;
+ k_unexpected_up = ps2kbd_unexpected_up;
+ k_leds = ps2kbd_leds;
+#ifdef CONFIG_MAGIC_SYSRQ
+ k_sysrq_xlate = ps2kbd_sysrq_xlate;
+ k_sysrq_key = 13;
+#endif
return 0;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)