From 139385383267de547f5dbdbd2049d3a9c996c85e Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Sun, 5 May 2013 23:12:46 +0200 Subject: 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 Signed-off-by: Jiri Kosina --- drivers/hid/hid-wiimote.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'drivers/hid/hid-wiimote.h') diff --git a/drivers/hid/hid-wiimote.h b/drivers/hid/hid-wiimote.h index a2629ed4a95..2700d47dea3 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; }; -- cgit v1.2.3-70-g09d2