summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-07-29 09:48:34 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-29 09:48:34 -0700
commite0d7ff168a71299919f01500b3d507aae0c67513 (patch)
treede2a7807ec5642e7389191e66d8c5d6d1249096a /include
parentca49a601c2b4b74e5cf57fef62122204d1982372 (diff)
parent33fdfa97f2b3aab698ef849ec50dcc5102017f0a (diff)
downloadlinux-stable-e0d7ff168a71299919f01500b3d507aae0c67513.tar.gz
linux-stable-e0d7ff168a71299919f01500b3d507aae0c67513.tar.bz2
linux-stable-e0d7ff168a71299919f01500b3d507aae0c67513.zip
Merge master.kernel.org:/pub/scm/linux/kernel/git/dtor/input
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 {
void *private;
- char *name;
- char *phys;
- char *uniq;
+ const char *name;
+ const char *phys;
+ const char *uniq;
struct input_id id;
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 {
int code; /* UI_FF_UPLOAD, UI_FF_ERASE */
int retval;
- wait_queue_head_t waitq;
- int completed;
+ struct completion done;
union {
int effect_id;
@@ -62,7 +61,7 @@ struct uinput_device {
struct uinput_request *requests[UINPUT_NUM_REQUESTS];
wait_queue_head_t requests_waitq;
- struct semaphore requests_sem;
+ spinlock_t requests_lock;
};
#endif /* __KERNEL__ */
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 @@
+#ifndef __USB_INPUT_H
+#define __USB_INPUT_H
+
+/*
+ * Copyright (C) 2005 Dmitry Torokhov
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation.
+ */
+
+#include <linux/usb.h>
+#include <linux/input.h>
+#include <asm/byteorder.h>
+
+static inline void
+usb_to_input_id(const struct usb_device *dev, struct input_id *id)
+{
+ id->bustype = BUS_USB;
+ id->vendor = le16_to_cpu(dev->descriptor.idVendor);
+ id->product = le16_to_cpu(dev->descriptor.idProduct);
+ id->version = le16_to_cpu(dev->descriptor.bcdDevice);
+}
+
+#endif