HID: wacom - remove report_id from wacom_get_report interface
authorPing Cheng <pinglinux@gmail.com>
Wed, 10 Sep 2014 19:41:04 +0000 (12:41 -0700)
committerJiri Kosina <jkosina@suse.cz>
Thu, 11 Sep 2014 08:24:13 +0000 (10:24 +0200)
It is assigned in buf[0] anyway.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/wacom_sys.c

index 0a04c9a..c6970e6 100644 (file)
 #define DEV_ATTR_RW_PERM (S_IRUGO | 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,
-                           void *buf, size_t size, unsigned int retries)
+static int wacom_get_report(struct hid_device *hdev, u8 type, u8 *buf,
+                           size_t size, unsigned int retries)
 {
        int retval;
 
        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);
        } while ((retval == -ETIMEDOUT || retval == -EPIPE) && --retries);
 
@@ -258,7 +258,7 @@ static int wacom_set_device_mode(struct hid_device *hdev, int report_id,
                                         length, 1);
                if (error >= 0)
                        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);
 
        kfree(rep_data);