[PATCH 3/3] HID: lenovo: Remove LEDs from tpkbd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since both LEDs are now supported by the input-leds module, the custom
LEDs set via a proprietary method are no longer required. In fact they
are duplicates that might interfere with each other.

Signed-off-by: Bernhard Seibold <mail@xxxxxxxxxxxxxxxxxxx>
---
 drivers/hid/hid-lenovo.c | 21 ---------------------
 1 file changed, 21 deletions(-)

diff --git a/drivers/hid/hid-lenovo.c b/drivers/hid/hid-lenovo.c
index 149a3c74346b..e3eae18fd4ab 100644
--- a/drivers/hid/hid-lenovo.c
+++ b/drivers/hid/hid-lenovo.c
@@ -1004,17 +1004,6 @@ static const struct attribute_group lenovo_attr_group_tpkbd = {
 	.attrs = lenovo_attributes_tpkbd,
 };
 
-static void lenovo_led_set_tpkbd(struct hid_device *hdev)
-{
-	struct lenovo_drvdata *data_pointer = hid_get_drvdata(hdev);
-	struct hid_report *report;
-
-	report = hdev->report_enum[HID_OUTPUT_REPORT].report_id_hash[3];
-	report->field[0]->value[0] = (data_pointer->led_state >> 0) & 1;
-	report->field[0]->value[1] = (data_pointer->led_state >> 1) & 1;
-	hid_hw_request(hdev, report, HID_REQ_SET_REPORT);
-}
-
 static int lenovo_led_brightness_set(struct led_classdev *led_cdev,
 			enum led_brightness value)
 {
@@ -1034,9 +1023,6 @@ static int lenovo_led_brightness_set(struct led_classdev *led_cdev,
 		data_pointer->led_state |= 1 << led_nr;
 
 	switch (hdev->product) {
-	case USB_DEVICE_ID_LENOVO_TPKBD:
-		lenovo_led_set_tpkbd(hdev);
-		break;
 	case USB_DEVICE_ID_LENOVO_TP10UBKBD:
 	case USB_DEVICE_ID_LENOVO_X1_TAB:
 		ret = lenovo_led_set_tp10ubkbd(hdev, tp10ubkbd_led[led_nr], value);
@@ -1128,10 +1114,6 @@ static int lenovo_probe_tpkbd(struct hid_device *hdev)
 
 	hid_set_drvdata(hdev, data_pointer);
 
-	ret = lenovo_register_leds(hdev);
-	if (ret)
-		goto err;
-
 	lenovo_features_set_tpkbd(hdev);
 
 	return 0;
@@ -1315,9 +1297,6 @@ static void lenovo_remove_tpkbd(struct hid_device *hdev)
 
 	sysfs_remove_group(&hdev->dev.kobj,
 			&lenovo_attr_group_tpkbd);
-
-	led_classdev_unregister(&data_pointer->led_micmute);
-	led_classdev_unregister(&data_pointer->led_mute);
 }
 
 static void lenovo_remove_cptkbd(struct hid_device *hdev)
-- 
2.43.0





[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux