From: Pavel Rojtberg <rojtberg@xxxxxxxxx> This series tries to finish the work of: http://www.spinics.net/lists/linux-input/msg29445.html Citing the original submission: Rework the xpad driver to fix the issue where when a wireless xpad controller is plugged in, 4 joystick devices are created, no matter how many are really attached to the system. This is done by dynamically creating the devices only when they are found by the wireless receiver. Along the way all usages of the out URB were guarded by the mutex and a active flag was introduced to prevent usage while active. This makes outbound communication more robust. (LED, FF, presence query) Patches 1-2 clean up the x360 LED code after: http://www.spinics.net/lists/linux-input/msg39147.html partifularly the LED command on x360w pads is not submitted twice any more. They are the same as already submitted here: http://www.spinics.net/lists/linux-input/msg39438.html Patches 3-6 implement the actual "on demand" creation/ deletion of input devices. To this end pad enumeration had to be changed from an monotonic counter to a bitmask based counter. See Patch 6 for rationale. Patches 7-8 prevent sending active URBs. This was alrady an issue before, but is now more pressing as we always send the query packet on driver load. (x360w) Pavel Rojtberg (6): Input: xpad: clarify LED enumeration Input: xpad: remove bulk out URB Input: xpad: query Wireless controller state at init Input: xpad: use bitmask for finding the pad_nr Input: xpad: factor out URB submission in xpad_play_effect Input: xpad: do not submit active URBs Pierre-Loup A. Griffais (2): Input: xpad: move the input device creation to a new function Input: xpad: handle "present" and "gone" correctly xpad.c | 539 +++++++++++++++++++++++++++++++++++------------------------------ 1 file changed, 290 insertions(+), 249 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html