summaryrefslogtreecommitdiff
path: root/drivers/input/joystick/xpad.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2015-12-16 14:24:58 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-01 09:46:37 +0100
commit95a5664d19396dc8a26d106b5898738a1bf9184e (patch)
treef8980d54564656ae0d447b217fefd32de15b5c7a /drivers/input/joystick/xpad.c
parent40af28e5fa9c99a9e51ad3d1bd4d0e7a90352383 (diff)
Input: xpad - use LED API when identifying wireless controllers
[ Upstream commit d9be398afb2c3333716324352d062c50112e4e86 ] When lighting up the segment identifying wireless controller, Instead of sending command directly to the controller, let's do it via LED API (usinf led_set_brightness) so that LED object state is in sync with controller state and we'll light up the correct segment on resume as well. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/input/joystick/xpad.c')
-rw-r--r--drivers/input/joystick/xpad.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index 0caced4a68cc..c3a38804cdc0 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -1142,7 +1142,7 @@ static void xpad_send_led_command(struct usb_xpad *xpad, int command)
*/
static void xpad_identify_controller(struct usb_xpad *xpad)
{
- xpad_send_led_command(xpad, (xpad->pad_nr % 4) + 2);
+ led_set_brightness(&xpad->led->led_cdev, (xpad->pad_nr % 4) + 2);
}
static void xpad_led_set(struct led_classdev *led_cdev,