소스 검색

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>
Dmitry Torokhov 9 년 전
부모
커밋
d9be398afb
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      drivers/input/joystick/xpad.c

+ 1 - 1
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)
 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,
 static void xpad_led_set(struct led_classdev *led_cdev,