Commit c64d8834 authored by Ping Cheng's avatar Ping Cheng Committed by Jiri Kosina

HID: wacom - remove report_id from wacom_get_report interface

It is assigned in buf[0] anyway.
Signed-off-by: default avatarPing Cheng <pingc@wacom.com>
Reviewed-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 37449adc
...@@ -26,13 +26,13 @@ ...@@ -26,13 +26,13 @@
#define DEV_ATTR_RW_PERM (S_IRUGO | S_IWUSR | S_IWGRP) #define DEV_ATTR_RW_PERM (S_IRUGO | S_IWUSR | S_IWGRP)
#define DEV_ATTR_WO_PERM (S_IWUSR | S_IWGRP) #define DEV_ATTR_WO_PERM (S_IWUSR | S_IWGRP)
static int wacom_get_report(struct hid_device *hdev, u8 type, u8 id, static int wacom_get_report(struct hid_device *hdev, u8 type, u8 *buf,
void *buf, size_t size, unsigned int retries) size_t size, unsigned int retries)
{ {
int retval; int retval;
do { do {
retval = hid_hw_raw_request(hdev, id, buf, size, type, retval = hid_hw_raw_request(hdev, buf[0], buf, size, type,
HID_REQ_GET_REPORT); HID_REQ_GET_REPORT);
} while ((retval == -ETIMEDOUT || retval == -EPIPE) && --retries); } while ((retval == -ETIMEDOUT || retval == -EPIPE) && --retries);
...@@ -258,7 +258,7 @@ static int wacom_set_device_mode(struct hid_device *hdev, int report_id, ...@@ -258,7 +258,7 @@ static int wacom_set_device_mode(struct hid_device *hdev, int report_id,
length, 1); length, 1);
if (error >= 0) if (error >= 0)
error = wacom_get_report(hdev, HID_FEATURE_REPORT, error = wacom_get_report(hdev, HID_FEATURE_REPORT,
report_id, rep_data, length, 1); rep_data, length, 1);
} while ((error < 0 || rep_data[1] != mode) && limit++ < WAC_MSG_RETRIES); } while ((error < 0 || rep_data[1] != mode) && limit++ < WAC_MSG_RETRIES);
kfree(rep_data); kfree(rep_data);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment