aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-lenovo-tpkbd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hid/hid-lenovo-tpkbd.c')
-rw-r--r--drivers/hid/hid-lenovo-tpkbd.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/hid/hid-lenovo-tpkbd.c b/drivers/hid/hid-lenovo-tpkbd.c
index 956c3b135f64..07837f5a4eb8 100644
--- a/drivers/hid/hid-lenovo-tpkbd.c
+++ b/drivers/hid/hid-lenovo-tpkbd.c
@@ -68,7 +68,7 @@ static int tpkbd_features_set(struct hid_device *hdev)
68 report->field[2]->value[0] = data_pointer->sensitivity; 68 report->field[2]->value[0] = data_pointer->sensitivity;
69 report->field[3]->value[0] = data_pointer->press_speed; 69 report->field[3]->value[0] = data_pointer->press_speed;
70 70
71 usbhid_submit_report(hdev, report, USB_DIR_OUT); 71 hid_hw_request(hdev, report, HID_REQ_SET_REPORT);
72 return 0; 72 return 0;
73} 73}
74 74
@@ -228,8 +228,6 @@ static ssize_t pointer_press_speed_show(struct device *dev,
228 struct hid_device *hdev = container_of(dev, struct hid_device, dev); 228 struct hid_device *hdev = container_of(dev, struct hid_device, dev);
229 struct tpkbd_data_pointer *data_pointer = hid_get_drvdata(hdev); 229 struct tpkbd_data_pointer *data_pointer = hid_get_drvdata(hdev);
230 230
231 data_pointer = hid_get_drvdata(hdev);
232
233 return snprintf(buf, PAGE_SIZE, "%u\n", 231 return snprintf(buf, PAGE_SIZE, "%u\n",
234 data_pointer->press_speed); 232 data_pointer->press_speed);
235} 233}
@@ -332,7 +330,7 @@ static void tpkbd_led_brightness_set(struct led_classdev *led_cdev,
332 report = hdev->report_enum[HID_OUTPUT_REPORT].report_id_hash[3]; 330 report = hdev->report_enum[HID_OUTPUT_REPORT].report_id_hash[3];
333 report->field[0]->value[0] = (data_pointer->led_state >> 0) & 1; 331 report->field[0]->value[0] = (data_pointer->led_state >> 0) & 1;
334 report->field[0]->value[1] = (data_pointer->led_state >> 1) & 1; 332 report->field[0]->value[1] = (data_pointer->led_state >> 1) & 1;
335 usbhid_submit_report(hdev, report, USB_DIR_OUT); 333 hid_hw_request(hdev, report, HID_REQ_SET_REPORT);
336} 334}
337 335
338static int tpkbd_probe_tp(struct hid_device *hdev) 336static int tpkbd_probe_tp(struct hid_device *hdev)