diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2013-05-05 17:12:46 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2013-06-03 05:06:58 -0400 |
commit | 139385383267de547f5dbdbd2049d3a9c996c85e (patch) | |
tree | fda36e038e466cfa56863b1d9e5909d7964896ba /drivers/hid/hid-wiimote.h | |
parent | 92eda7e4e5f9728e643553b378f55c75739554c2 (diff) |
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.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/hid/hid-wiimote.h b/drivers/hid/hid-wiimote.h index a2629ed4a957..2700d47dea3d 100644 --- a/drivers/hid/hid-wiimote.h +++ b/drivers/hid/hid-wiimote.h | |||
@@ -48,6 +48,14 @@ struct wiimote_buf { | |||
48 | size_t size; | 48 | size_t size; |
49 | }; | 49 | }; |
50 | 50 | ||
51 | struct wiimote_queue { | ||
52 | spinlock_t lock; | ||
53 | struct work_struct worker; | ||
54 | __u8 head; | ||
55 | __u8 tail; | ||
56 | struct wiimote_buf outq[WIIMOTE_BUFSIZE]; | ||
57 | }; | ||
58 | |||
51 | struct wiimote_state { | 59 | struct wiimote_state { |
52 | spinlock_t lock; | 60 | spinlock_t lock; |
53 | __u8 flags; | 61 | __u8 flags; |
@@ -77,12 +85,7 @@ struct wiimote_data { | |||
77 | struct wiimote_ext *ext; | 85 | struct wiimote_ext *ext; |
78 | struct wiimote_debug *debug; | 86 | struct wiimote_debug *debug; |
79 | 87 | ||
80 | spinlock_t qlock; | 88 | struct wiimote_queue queue; |
81 | __u8 head; | ||
82 | __u8 tail; | ||
83 | struct wiimote_buf outq[WIIMOTE_BUFSIZE]; | ||
84 | struct work_struct worker; | ||
85 | |||
86 | struct wiimote_state state; | 89 | struct wiimote_state state; |
87 | }; | 90 | }; |
88 | 91 | ||