[parisc-linux-cvs] added unregister_kbd_ops(void)
Helge Deller
deller@gmx.de
Tue, 25 Jun 2002 22:35:38 +0200
--Boundary-00=_aQNG9d4xzNDlGON
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
Content-Disposition: inline
On Tuesday 25 June 2002 22:32, Helge Deller wrote:
> CVSROOT: /var/cvs
> Module name: linux
> Changes by: deller 02/06/25 14:32:07
>
> Modified files:
> arch/parisc/kernel: keyboard.c
> include/asm-parisc: keyboard.h
>
> Log message:
> added unregister_kbd_ops(void) to make it possible to unload the hilkbd
--Boundary-00=_aQNG9d4xzNDlGON
Content-Type: text/plain;
charset="iso-8859-1";
name="diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="diff"
Index: arch/parisc/kernel/keyboard.c
===================================================================
RCS file: /var/cvs/linux/arch/parisc/kernel/keyboard.c,v
retrieving revision 1.5
diff -u -p -r1.5 keyboard.c
--- arch/parisc/kernel/keyboard.c 2001/11/10 05:01:38 1.5
+++ arch/parisc/kernel/keyboard.c 2002/06/25 20:31:00
@@ -44,19 +44,27 @@ static void def_init_hw(void)
static char def_sysrq_xlate[NR_KEYS];
-static struct kbd_ops def_kbd_ops = {
- setkeycode: def_setkeycode,
- getkeycode: def_getkeycode,
- translate: def_translate,
- unexpected_up: def_unexpected_up,
- leds: def_leds,
- init_hw: def_init_hw,
-
- sysrq_key: 0xff,
+#define DEFAULT_KEYB_OPS \
+ setkeycode: def_setkeycode, \
+ getkeycode: def_getkeycode, \
+ translate: def_translate, \
+ unexpected_up: def_unexpected_up, \
+ leds: def_leds, \
+ init_hw: def_init_hw, \
+ sysrq_key: 0xff, \
sysrq_xlate: def_sysrq_xlate,
+
+static struct kbd_ops def_kbd_ops = {
+ DEFAULT_KEYB_OPS
};
struct kbd_ops *kbd_ops = &def_kbd_ops;
+
+void unregister_kbd_ops(void)
+{
+ struct kbd_ops new_kbd_ops = { DEFAULT_KEYB_OPS };
+ register_kbd_ops(&new_kbd_ops);
+}
void register_kbd_ops(struct kbd_ops *ops)
{
Index: include/asm-parisc/keyboard.h
===================================================================
RCS file: /var/cvs/linux/include/asm-parisc/keyboard.h,v
retrieving revision 1.7
diff -u -p -r1.7 keyboard.h
--- include/asm-parisc/keyboard.h 2001/11/10 05:01:38 1.7
+++ include/asm-parisc/keyboard.h 2002/06/25 20:31:00
@@ -61,6 +61,7 @@ extern struct kbd_ops {
#define kbd_sysrq_xlate (kbd_ops->sysrq_xlate)
extern unsigned char hp_ps2kbd_sysrq_xlate[128]; /* from drivers/char/hp_keyb.c */
+extern void unregister_kbd_ops(void);
extern void register_kbd_ops(struct kbd_ops *ops);
#endif /* CONFIG_VT */
--Boundary-00=_aQNG9d4xzNDlGON--