diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-12-16 14:24:58 -0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2016-01-04 14:35:15 -0800 |
commit | d9be398afb2c3333716324352d062c50112e4e86 (patch) | |
tree | 04355bfb72e4d52d928f20cdff4d5b06f2cb0059 /drivers/input | |
parent | 4220f7db1e424f2a086ad41217b5770cc9f003a9 (diff) | |
download | linux-d9be398afb2c3333716324352d062c50112e4e86.tar.gz |
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.c | 2 |
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, |