aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/input.h6
-rw-r--r--include/linux/uinput.h5
-rw-r--r--include/linux/usb_input.h25
3 files changed, 30 insertions, 6 deletions
diff --git a/include/linux/input.h b/include/linux/input.h
index b9cc0ac71f44..bdc53c6cc962 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -811,9 +811,9 @@ struct input_dev {
811 811
812 void *private; 812 void *private;
813 813
814 char *name; 814 const char *name;
815 char *phys; 815 const char *phys;
816 char *uniq; 816 const char *uniq;
817 struct input_id id; 817 struct input_id id;
818 818
819 unsigned long evbit[NBITS(EV_MAX)]; 819 unsigned long evbit[NBITS(EV_MAX)];
diff --git a/include/linux/uinput.h b/include/linux/uinput.h
index 4c2c82336d10..84876077027f 100644
--- a/include/linux/uinput.h
+++ b/include/linux/uinput.h
@@ -42,8 +42,7 @@ struct uinput_request {
42 int code; /* UI_FF_UPLOAD, UI_FF_ERASE */ 42 int code; /* UI_FF_UPLOAD, UI_FF_ERASE */
43 43
44 int retval; 44 int retval;
45 wait_queue_head_t waitq; 45 struct completion done;
46 int completed;
47 46
48 union { 47 union {
49 int effect_id; 48 int effect_id;
@@ -62,7 +61,7 @@ struct uinput_device {
62 61
63 struct uinput_request *requests[UINPUT_NUM_REQUESTS]; 62 struct uinput_request *requests[UINPUT_NUM_REQUESTS];
64 wait_queue_head_t requests_waitq; 63 wait_queue_head_t requests_waitq;
65 struct semaphore requests_sem; 64 spinlock_t requests_lock;
66}; 65};
67#endif /* __KERNEL__ */ 66#endif /* __KERNEL__ */
68 67
diff --git a/include/linux/usb_input.h b/include/linux/usb_input.h
new file mode 100644
index 000000000000..716e0cc16043
--- /dev/null
+++ b/include/linux/usb_input.h
@@ -0,0 +1,25 @@
1#ifndef __USB_INPUT_H
2#define __USB_INPUT_H
3
4/*
5 * Copyright (C) 2005 Dmitry Torokhov
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11
12#include <linux/usb.h>
13#include <linux/input.h>
14#include <asm/byteorder.h>
15
16static inline void
17usb_to_input_id(const struct usb_device *dev, struct input_id *id)
18{
19 id->bustype = BUS_USB;
20 id->vendor = le16_to_cpu(dev->descriptor.idVendor);
21 id->product = le16_to_cpu(dev->descriptor.idProduct);
22 id->version = le16_to_cpu(dev->descriptor.bcdDevice);
23}
24
25#endif