From: Pavel Rojtberg Date: Mon, 19 Oct 2015 07:06:58 +0000 (-0700) Subject: Input: xpad - fix clash of presence handling with LED setting X-Git-Tag: v3.18.128~51 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d6d5f0290ba636043a272c8a530e1426de37008e;p=profile%2Fwearable%2Fplatform%2Fkernel%2Flinux-3.18-exynos7270.git Input: xpad - fix clash of presence handling with LED setting [ Upstream commit fbe6a3114471cccaeaeabfa56937731503ece545 ] 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 Signed-off-by: Dmitry Torokhov Signed-off-by: Sasha Levin --- diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index ff36886..1a66443 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c @@ -1003,8 +1003,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: