summaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2015-12-16 23:24:58 +0100
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2016-01-04 23:35:15 +0100
commitd9be398afb2c3333716324352d062c50112e4e86 (patch)
tree04355bfb72e4d52d928f20cdff4d5b06f2cb0059 /drivers/input
parentInput: xpad - workaround dead irq_out after suspend/ resume (diff)
downloadlinux-d9be398afb2c3333716324352d062c50112e4e86.tar.xz
linux-d9be398afb2c3333716324352d062c50112e4e86.zip
Input: xpad - use LED API when identifying wireless controllers
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>
Diffstat (limited to 'drivers/input')
-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 fa2612c9799c..22e62056ca6b 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -1140,7 +1140,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,