File: input-enter-key.diff

package info (click to toggle)
kernel-patch-2.2.20-powerpc 2.2.20-3woody1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 108 kB
  • ctags: 13
  • sloc: makefile: 94; sh: 59
file content (74 lines) | stat: -rw-r--r-- 2,326 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
diff -ur unp/kernel-source-2.2.19/drivers/macintosh/adbhid.c kernel-source-2.2.19/drivers/macintosh/adbhid.c
--- unp/kernel-source-2.2.19/drivers/macintosh/adbhid.c	Fri Nov 17 18:21:50 2000
+++ kernel-source-2.2.19/drivers/macintosh/adbhid.c	Sat Apr 14 19:53:47 2001
@@ -853,7 +859,7 @@
  	adb_request(&req, NULL, ADBREQ_SYNC, 1, ADB_FLUSH(id));
 }
 
-static int __init adbhid_init(void)
+int __init adbhid_init(void)
 {
 	if ( (_machine != _MACH_chrp) && (_machine != _MACH_Pmac) )
 	    return 0;
@@ -867,9 +873,11 @@
 	return 0;
 }
 
+#if 0
 static void adbhid_exit(void)
 {
 }
  
 module_init(adbhid_init);
 module_exit(adbhid_exit);
+#endif
diff -ur unp/kernel-source-2.2.19/drivers/macintosh/mac_hid.c kernel-source-2.2.19/drivers/macintosh/mac_hid.c
--- unp/kernel-source-2.2.19/drivers/macintosh/mac_hid.c	Tue Mar 13 03:32:22 2001
+++ kernel-source-2.2.19/drivers/macintosh/mac_hid.c	Sat Apr 14 19:52:18 2001
@@ -192,6 +192,8 @@
 int keyboard_sends_linux_keycodes = 1;
 #endif /* CONFIG_MAC_ADBKEYCODES */
 
+extern int adbhid_init(void);
+
 static int mac_hid_sysctl_keycodes(ctl_table *ctl, int write, struct file * filp,
 				   void *buffer, size_t *lenp);
 
@@ -494,4 +496,8 @@
 #ifdef CONFIG_SYSCTL
 	mac_hid_sysctl_header = register_sysctl_table(mac_hid_root_dir, 1);
 #endif /* CONFIG_SYSCTL */
+
+#ifdef CONFIG_INPUT_ADBHID
+	adbhid_init();
+#endif
 }
diff -ur unp/kernel-source-2.2.19/drivers/usb/input.c kernel-source-2.2.19/drivers/usb/input.c
--- unp/kernel-source-2.2.19/drivers/usb/input.c	Fri Nov 17 18:22:11 2000
+++ kernel-source-2.2.19/drivers/usb/input.c	Sat Apr 14 14:33:02 2001
@@ -33,6 +33,7 @@
 #include <linux/module.h>
 #include <linux/random.h>
 #include <linux/kcomp.h>
+#include <linux/sched.h>
 
 MODULE_AUTHOR("Vojtech Pavlik <vojtech@suse.cz>");
 MODULE_DESCRIPTION("Input layer module");
@@ -57,6 +58,8 @@
 static int input_number = 0;
 static long input_devices[NBITS(INPUT_DEVICES)] = { 0, /* ... */ };
 
+extern struct wait_queue * keypress_wait;
+
 void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value)
 {
 	struct input_handle *handle = dev->handle;
@@ -71,6 +74,8 @@
 	switch (type) {
 
 		case EV_KEY:
+
+			wake_up(&keypress_wait);
 
 			if (code > KEY_MAX || !test_bit(code, dev->keybit) || !!test_bit(code, dev->key) == value)
 				return;