patch-2.3.27 linux/drivers/char/keyboard.c

Next file: linux/drivers/char/mem.c
Previous file: linux/drivers/char/ip2main.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.26/linux/drivers/char/keyboard.c linux/drivers/char/keyboard.c
@@ -32,7 +32,6 @@
 #include <linux/string.h>
 #include <linux/random.h>
 #include <linux/init.h>
-#include <linux/module.h>
 
 #include <asm/keyboard.h>
 #include <asm/bitops.h>
@@ -42,6 +41,7 @@
 #include <linux/vt_kern.h>
 #include <linux/kbd_ll.h>
 #include <linux/sysrq.h>
+#include <linux/acpi.h>
 
 #define SIZE(x) (sizeof(x)/sizeof((x)[0]))
 
@@ -159,6 +159,9 @@
 int sysrq_enabled = 1;
 #endif
 
+static struct acpi_dev_info acpi_kbd_info = {ACPI_SYS_DEV, ACPI_KBC_HID, NULL};
+static struct acpi_dev *acpi_kbd = NULL;
+
 /*
  * Many other routines do put_queue, but I think either
  * they produce ASCII, or they produce some user-assigned
@@ -201,6 +204,8 @@
 	char up_flag = down ? 0 : 0200;
 	char raw_mode;
 
+	acpi_access(acpi_kbd);
+
 	do_poke_blanked_console = 1;
 	mark_bh(CONSOLE_BH);
 	add_keyboard_randomness(scancode | up_flag);
@@ -923,5 +928,8 @@
 	kbd_init_hw();
 	init_bh(KEYBOARD_BH, kbd_bh);
 	mark_bh(KEYBOARD_BH);
+	
+	acpi_kbd = acpi_register(&acpi_kbd_info, 0);
+
 	return 0;
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)