diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-04-02 15:49:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-04-02 15:49:19 -0400 |
commit | 9c8680e2cfbb60d5075f8caaf9d98276120bcc78 (patch) | |
tree | 1957cff26a46271d5b63a3c209629ddd7f9fe124 /include/linux | |
parent | f900e5824a44ab65437b4f7e7c610b72f94820c5 (diff) | |
parent | b9ec4e109d7a342e83e1210e05797222e36555c3 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/dtor/input
* master.kernel.org:/pub/scm/linux/kernel/git/dtor/input: (26 commits)
Input: add support for Braille devices
Input: synaptics - limit rate to 40pps on Toshiba Protege M300
Input: gamecon - add SNES mouse support
Input: make modalias code respect allowed buffer size
Input: convert /proc handling to seq_file
Input: limit attributes' output to PAGE_SIZE
Input: gameport - fix memory leak
Input: serio - fix memory leak
Input: zaurus keyboard driver updates
Input: i8042 - fix logic around pnp_register_driver()
Input: ns558 - fix logic around pnp_register_driver()
Input: pcspkr - separate device and driver registration
Input: atkbd - allow disabling on X86_PC (if EMBEDDED)
Input: atkbd - disable softrepeat for dumb keyboards
Input: atkbd - fix complaints about 'releasing unknown key 0x7f'
Input: HID - fix duplicate key mapping for Logitech UltraX remote
Input: use kzalloc() throughout the code
Input: fix input_free_device() implementation
Input: initialize serio and gameport at subsystem level
Input: uinput - semaphore to mutex conversion
...
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/gameport.h | 7 | ||||
-rw-r--r-- | include/linux/input.h | 23 | ||||
-rw-r--r-- | include/linux/kbd_kern.h | 2 | ||||
-rw-r--r-- | include/linux/keyboard.h | 13 | ||||
-rw-r--r-- | include/linux/libps2.h | 2 | ||||
-rw-r--r-- | include/linux/serio.h | 9 | ||||
-rw-r--r-- | include/linux/uinput.h | 4 |
7 files changed, 43 insertions, 17 deletions
diff --git a/include/linux/gameport.h b/include/linux/gameport.h index 9c8e6da2393b..71e7b2847cb3 100644 --- a/include/linux/gameport.h +++ b/include/linux/gameport.h | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include <asm/io.h> | 12 | #include <asm/io.h> |
13 | #include <linux/list.h> | 13 | #include <linux/list.h> |
14 | #include <linux/mutex.h> | ||
14 | #include <linux/device.h> | 15 | #include <linux/device.h> |
15 | #include <linux/timer.h> | 16 | #include <linux/timer.h> |
16 | 17 | ||
@@ -40,7 +41,7 @@ struct gameport { | |||
40 | struct gameport *parent, *child; | 41 | struct gameport *parent, *child; |
41 | 42 | ||
42 | struct gameport_driver *drv; | 43 | struct gameport_driver *drv; |
43 | struct semaphore drv_sem; /* protects serio->drv so attributes can pin driver */ | 44 | struct mutex drv_mutex; /* protects serio->drv so attributes can pin driver */ |
44 | 45 | ||
45 | struct device dev; | 46 | struct device dev; |
46 | unsigned int registered; /* port has been fully registered with driver core */ | 47 | unsigned int registered; /* port has been fully registered with driver core */ |
@@ -137,12 +138,12 @@ static inline void gameport_set_drvdata(struct gameport *gameport, void *data) | |||
137 | */ | 138 | */ |
138 | static inline int gameport_pin_driver(struct gameport *gameport) | 139 | static inline int gameport_pin_driver(struct gameport *gameport) |
139 | { | 140 | { |
140 | return down_interruptible(&gameport->drv_sem); | 141 | return mutex_lock_interruptible(&gameport->drv_mutex); |
141 | } | 142 | } |
142 | 143 | ||
143 | static inline void gameport_unpin_driver(struct gameport *gameport) | 144 | static inline void gameport_unpin_driver(struct gameport *gameport) |
144 | { | 145 | { |
145 | up(&gameport->drv_sem); | 146 | mutex_unlock(&gameport->drv_mutex); |
146 | } | 147 | } |
147 | 148 | ||
148 | void __gameport_register_driver(struct gameport_driver *drv, struct module *owner); | 149 | void __gameport_register_driver(struct gameport_driver *drv, struct module *owner); |
diff --git a/include/linux/input.h b/include/linux/input.h index 1d4e341b72e6..b0e612dda0cf 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -421,7 +421,7 @@ struct input_absinfo { | |||
421 | #define BTN_GEAR_UP 0x151 | 421 | #define BTN_GEAR_UP 0x151 |
422 | 422 | ||
423 | #define KEY_OK 0x160 | 423 | #define KEY_OK 0x160 |
424 | #define KEY_SELECT 0x161 | 424 | #define KEY_SELECT 0x161 |
425 | #define KEY_GOTO 0x162 | 425 | #define KEY_GOTO 0x162 |
426 | #define KEY_CLEAR 0x163 | 426 | #define KEY_CLEAR 0x163 |
427 | #define KEY_POWER2 0x164 | 427 | #define KEY_POWER2 0x164 |
@@ -512,6 +512,15 @@ struct input_absinfo { | |||
512 | #define KEY_FN_S 0x1e3 | 512 | #define KEY_FN_S 0x1e3 |
513 | #define KEY_FN_B 0x1e4 | 513 | #define KEY_FN_B 0x1e4 |
514 | 514 | ||
515 | #define KEY_BRL_DOT1 0x1f1 | ||
516 | #define KEY_BRL_DOT2 0x1f2 | ||
517 | #define KEY_BRL_DOT3 0x1f3 | ||
518 | #define KEY_BRL_DOT4 0x1f4 | ||
519 | #define KEY_BRL_DOT5 0x1f5 | ||
520 | #define KEY_BRL_DOT6 0x1f6 | ||
521 | #define KEY_BRL_DOT7 0x1f7 | ||
522 | #define KEY_BRL_DOT8 0x1f8 | ||
523 | |||
515 | /* We avoid low common keys in module aliases so they don't get huge. */ | 524 | /* We avoid low common keys in module aliases so they don't get huge. */ |
516 | #define KEY_MIN_INTERESTING KEY_MUTE | 525 | #define KEY_MIN_INTERESTING KEY_MUTE |
517 | #define KEY_MAX 0x1ff | 526 | #define KEY_MAX 0x1ff |
@@ -929,7 +938,7 @@ struct input_dev { | |||
929 | 938 | ||
930 | struct input_handle *grab; | 939 | struct input_handle *grab; |
931 | 940 | ||
932 | struct semaphore sem; /* serializes open and close operations */ | 941 | struct mutex mutex; /* serializes open and close operations */ |
933 | unsigned int users; | 942 | unsigned int users; |
934 | 943 | ||
935 | struct class_device cdev; | 944 | struct class_device cdev; |
@@ -995,11 +1004,6 @@ static inline void init_input_dev(struct input_dev *dev) | |||
995 | 1004 | ||
996 | struct input_dev *input_allocate_device(void); | 1005 | struct input_dev *input_allocate_device(void); |
997 | 1006 | ||
998 | static inline void input_free_device(struct input_dev *dev) | ||
999 | { | ||
1000 | kfree(dev); | ||
1001 | } | ||
1002 | |||
1003 | static inline struct input_dev *input_get_device(struct input_dev *dev) | 1007 | static inline struct input_dev *input_get_device(struct input_dev *dev) |
1004 | { | 1008 | { |
1005 | return to_input_dev(class_device_get(&dev->cdev)); | 1009 | return to_input_dev(class_device_get(&dev->cdev)); |
@@ -1010,6 +1014,11 @@ static inline void input_put_device(struct input_dev *dev) | |||
1010 | class_device_put(&dev->cdev); | 1014 | class_device_put(&dev->cdev); |
1011 | } | 1015 | } |
1012 | 1016 | ||
1017 | static inline void input_free_device(struct input_dev *dev) | ||
1018 | { | ||
1019 | input_put_device(dev); | ||
1020 | } | ||
1021 | |||
1013 | int input_register_device(struct input_dev *); | 1022 | int input_register_device(struct input_dev *); |
1014 | void input_unregister_device(struct input_dev *); | 1023 | void input_unregister_device(struct input_dev *); |
1015 | 1024 | ||
diff --git a/include/linux/kbd_kern.h b/include/linux/kbd_kern.h index e87c32a5c86a..4eb851ece080 100644 --- a/include/linux/kbd_kern.h +++ b/include/linux/kbd_kern.h | |||
@@ -135,6 +135,8 @@ static inline void chg_vc_kbd_led(struct kbd_struct * kbd, int flag) | |||
135 | 135 | ||
136 | #define U(x) ((x) ^ 0xf000) | 136 | #define U(x) ((x) ^ 0xf000) |
137 | 137 | ||
138 | #define BRL_UC_ROW 0x2800 | ||
139 | |||
138 | /* keyboard.c */ | 140 | /* keyboard.c */ |
139 | 141 | ||
140 | struct console; | 142 | struct console; |
diff --git a/include/linux/keyboard.h b/include/linux/keyboard.h index 08488042d74a..de76843bbe8a 100644 --- a/include/linux/keyboard.h +++ b/include/linux/keyboard.h | |||
@@ -44,6 +44,7 @@ extern unsigned short plain_map[NR_KEYS]; | |||
44 | #define KT_ASCII 9 | 44 | #define KT_ASCII 9 |
45 | #define KT_LOCK 10 | 45 | #define KT_LOCK 10 |
46 | #define KT_SLOCK 12 | 46 | #define KT_SLOCK 12 |
47 | #define KT_BRL 14 | ||
47 | 48 | ||
48 | #define K(t,v) (((t)<<8)|(v)) | 49 | #define K(t,v) (((t)<<8)|(v)) |
49 | #define KTYP(x) ((x) >> 8) | 50 | #define KTYP(x) ((x) >> 8) |
@@ -427,5 +428,17 @@ extern unsigned short plain_map[NR_KEYS]; | |||
427 | 428 | ||
428 | #define NR_LOCK 8 | 429 | #define NR_LOCK 8 |
429 | 430 | ||
431 | #define K_BRL_BLANK K(KT_BRL, 0) | ||
432 | #define K_BRL_DOT1 K(KT_BRL, 1) | ||
433 | #define K_BRL_DOT2 K(KT_BRL, 2) | ||
434 | #define K_BRL_DOT3 K(KT_BRL, 3) | ||
435 | #define K_BRL_DOT4 K(KT_BRL, 4) | ||
436 | #define K_BRL_DOT5 K(KT_BRL, 5) | ||
437 | #define K_BRL_DOT6 K(KT_BRL, 6) | ||
438 | #define K_BRL_DOT7 K(KT_BRL, 7) | ||
439 | #define K_BRL_DOT8 K(KT_BRL, 8) | ||
440 | |||
441 | #define NR_BRL 9 | ||
442 | |||
430 | #define MAX_DIACR 256 | 443 | #define MAX_DIACR 256 |
431 | #endif | 444 | #endif |
diff --git a/include/linux/libps2.h b/include/linux/libps2.h index a710bddda4eb..08a450a9dbf7 100644 --- a/include/linux/libps2.h +++ b/include/linux/libps2.h | |||
@@ -28,7 +28,7 @@ struct ps2dev { | |||
28 | struct serio *serio; | 28 | struct serio *serio; |
29 | 29 | ||
30 | /* Ensures that only one command is executing at a time */ | 30 | /* Ensures that only one command is executing at a time */ |
31 | struct semaphore cmd_sem; | 31 | struct mutex cmd_mutex; |
32 | 32 | ||
33 | /* Used to signal completion from interrupt handler */ | 33 | /* Used to signal completion from interrupt handler */ |
34 | wait_queue_head_t wait; | 34 | wait_queue_head_t wait; |
diff --git a/include/linux/serio.h b/include/linux/serio.h index 690aabca8ed0..6348e8330897 100644 --- a/include/linux/serio.h +++ b/include/linux/serio.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
19 | #include <linux/list.h> | 19 | #include <linux/list.h> |
20 | #include <linux/spinlock.h> | 20 | #include <linux/spinlock.h> |
21 | #include <linux/mutex.h> | ||
21 | #include <linux/device.h> | 22 | #include <linux/device.h> |
22 | #include <linux/mod_devicetable.h> | 23 | #include <linux/mod_devicetable.h> |
23 | 24 | ||
@@ -42,7 +43,7 @@ struct serio { | |||
42 | struct serio *parent, *child; | 43 | struct serio *parent, *child; |
43 | 44 | ||
44 | struct serio_driver *drv; /* accessed from interrupt, must be protected by serio->lock and serio->sem */ | 45 | struct serio_driver *drv; /* accessed from interrupt, must be protected by serio->lock and serio->sem */ |
45 | struct semaphore drv_sem; /* protects serio->drv so attributes can pin driver */ | 46 | struct mutex drv_mutex; /* protects serio->drv so attributes can pin driver */ |
46 | 47 | ||
47 | struct device dev; | 48 | struct device dev; |
48 | unsigned int registered; /* port has been fully registered with driver core */ | 49 | unsigned int registered; /* port has been fully registered with driver core */ |
@@ -151,17 +152,17 @@ static inline void serio_continue_rx(struct serio *serio) | |||
151 | */ | 152 | */ |
152 | static inline int serio_pin_driver(struct serio *serio) | 153 | static inline int serio_pin_driver(struct serio *serio) |
153 | { | 154 | { |
154 | return down_interruptible(&serio->drv_sem); | 155 | return mutex_lock_interruptible(&serio->drv_mutex); |
155 | } | 156 | } |
156 | 157 | ||
157 | static inline void serio_pin_driver_uninterruptible(struct serio *serio) | 158 | static inline void serio_pin_driver_uninterruptible(struct serio *serio) |
158 | { | 159 | { |
159 | down(&serio->drv_sem); | 160 | mutex_lock(&serio->drv_mutex); |
160 | } | 161 | } |
161 | 162 | ||
162 | static inline void serio_unpin_driver(struct serio *serio) | 163 | static inline void serio_unpin_driver(struct serio *serio) |
163 | { | 164 | { |
164 | up(&serio->drv_sem); | 165 | mutex_unlock(&serio->drv_mutex); |
165 | } | 166 | } |
166 | 167 | ||
167 | 168 | ||
diff --git a/include/linux/uinput.h b/include/linux/uinput.h index 0ff7ca68e5c5..7168302f9844 100644 --- a/include/linux/uinput.h +++ b/include/linux/uinput.h | |||
@@ -20,7 +20,7 @@ | |||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 | * | 21 | * |
22 | * Author: Aristeu Sergio Rozanski Filho <aris@cathedrallabs.org> | 22 | * Author: Aristeu Sergio Rozanski Filho <aris@cathedrallabs.org> |
23 | * | 23 | * |
24 | * Changes/Revisions: | 24 | * Changes/Revisions: |
25 | * 0.2 16/10/2004 (Micah Dowty <micah@navi.cx>) | 25 | * 0.2 16/10/2004 (Micah Dowty <micah@navi.cx>) |
26 | * - added force feedback support | 26 | * - added force feedback support |
@@ -51,7 +51,7 @@ struct uinput_request { | |||
51 | 51 | ||
52 | struct uinput_device { | 52 | struct uinput_device { |
53 | struct input_dev *dev; | 53 | struct input_dev *dev; |
54 | struct semaphore sem; | 54 | struct mutex mutex; |
55 | enum uinput_state state; | 55 | enum uinput_state state; |
56 | wait_queue_head_t waitq; | 56 | wait_queue_head_t waitq; |
57 | unsigned char ready; | 57 | unsigned char ready; |