Input: xpad - handle "present" and "gone" correctly
authorPierre-Loup A. Griffais <pgriffais@valvesoftware.com>
Wed, 9 Dec 2015 19:46:25 +0000 (11:46 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 17 Dec 2015 01:11:30 +0000 (17:11 -0800)
commit09c8b00ae3e16c8d0fd4beb2ca064502a76c0f17
tree2f20cb330eabda919f60791416c31df86a217447
parent93a017aa2f77291752e637bfd83f2459dba714cb
Input: xpad - handle "present" and "gone" correctly

Handle the "a new device is present" message properly by dynamically
creating the input device at this point in time. This means we now do not
"preallocate" all 4 devices when a single wireless base station is seen.
This requires a workqueue as we are in interrupt context when we learn
about this.

Also properly disconnect any devices that we are told are removed.

Signed-off-by: "Pierre-Loup A. Griffais" <pgriffais@valvesoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Pavel Rojtberg <rojtberg@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/joystick/xpad.c