Skip to content

Commit

Permalink
Input: xpad - fix clash of presence handling with LED setting
Browse files Browse the repository at this point in the history
Do not call xpad_identify_controller at init with wireless devices: it
conflicts with the already sent presence packet and will be called by
xpad360w_process_packet as needed anyway.

Signed-off-by: Pavel Rojtberg <rojtberg@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  • Loading branch information
Pavel Rojtberg authored and Dmitry Torokhov committed Oct 19, 2015
1 parent 9378c02 commit fbe6a31
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions drivers/input/joystick/xpad.c
Original file line number Diff line number Diff line change
Expand Up @@ -1001,8 +1001,15 @@ static int xpad_led_probe(struct usb_xpad *xpad)
if (error)
goto err_free_id;

/* Light up the segment corresponding to controller number */
xpad_identify_controller(xpad);
if (xpad->xtype == XTYPE_XBOX360) {
/*
* Light up the segment corresponding to controller
* number on wired devices. On wireless we'll do that
* when they respond to "presence" packet.
*/
xpad_identify_controller(xpad);
}

return 0;

err_free_id:
Expand Down

0 comments on commit fbe6a31

Please sign in to comment.