summaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-wiimote.h
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2013-05-05 23:12:46 +0200
committerJiri Kosina <jkosina@suse.cz>2013-06-03 11:06:58 +0200
commit139385383267de547f5dbdbd2049d3a9c996c85e (patch)
treefda36e038e466cfa56863b1d9e5909d7964896ba /drivers/hid/hid-wiimote.h
parent92eda7e4e5f9728e643553b378f55c75739554c2 (diff)
downloadop-kernel-dev-139385383267de547f5dbdbd2049d3a9c996c85e.zip
op-kernel-dev-139385383267de547f5dbdbd2049d3a9c996c85e.tar.gz
HID: wiimote: move queue handling into separate struct
The output queue is independent of the other wiimote modules and can run on its own. Therefore, move its members into a separate struct so we don't run into name collisions with other modules. This is only a syntactic change that renames all queue members to queue.*. Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-wiimote.h')
-rw-r--r--drivers/hid/hid-wiimote.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/hid/hid-wiimote.h b/drivers/hid/hid-wiimote.h
index a2629ed..2700d47 100644
--- a/drivers/hid/hid-wiimote.h
+++ b/drivers/hid/hid-wiimote.h
@@ -48,6 +48,14 @@ struct wiimote_buf {
size_t size;
};
+struct wiimote_queue {
+ spinlock_t lock;
+ struct work_struct worker;
+ __u8 head;
+ __u8 tail;
+ struct wiimote_buf outq[WIIMOTE_BUFSIZE];
+};
+
struct wiimote_state {
spinlock_t lock;
__u8 flags;
@@ -77,12 +85,7 @@ struct wiimote_data {
struct wiimote_ext *ext;
struct wiimote_debug *debug;
- spinlock_t qlock;
- __u8 head;
- __u8 tail;
- struct wiimote_buf outq[WIIMOTE_BUFSIZE];
- struct work_struct worker;
-
+ struct wiimote_queue queue;
struct wiimote_state state;
};
OpenPOWER on IntegriCloud