Commit 95a5664d authored by Dmitry Torokhov's avatar Dmitry Torokhov Committed by Greg Kroah-Hartman
Browse files

Input: xpad - use LED API when identifying wireless controllers

[ Upstream commit d9be398a


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: default avatarDmitry Torokhov <>
Signed-off-by: default avatarSasha Levin <>
parent 40af28e5
......@@ -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,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment