diff options
author | Aaron Ma <aaron.ma@canonical.com> | 2018-02-03 10:57:15 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2018-02-16 07:30:56 -0500 |
commit | 3064a03b94e60388f0955fcc29f3e8a978d28f75 (patch) | |
tree | aa533760ffce91785050d48be73e287043dd47f9 | |
parent | 6de0b13cc0b4ba10e98a9263d7a83b940720b77a (diff) |
HID: Fix hid_report_len usage
Follow the change of return type u32 of hid_report_len,
fix all the types of variables those get the return value of
hid_report_len to u32, and all other code already uses u32.
Cc: stable@vger.kernel.org
Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r-- | drivers/hid/hid-input.c | 3 | ||||
-rw-r--r-- | drivers/hid/hid-multitouch.c | 5 | ||||
-rw-r--r-- | drivers/hid/hid-rmi.c | 4 | ||||
-rw-r--r-- | drivers/hid/wacom_sys.c | 4 |
4 files changed, 9 insertions, 7 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 04d01b57d94c..d86398755b0d 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c | |||
@@ -1368,7 +1368,8 @@ static void hidinput_led_worker(struct work_struct *work) | |||
1368 | led_work); | 1368 | led_work); |
1369 | struct hid_field *field; | 1369 | struct hid_field *field; |
1370 | struct hid_report *report; | 1370 | struct hid_report *report; |
1371 | int len, ret; | 1371 | int ret; |
1372 | u32 len; | ||
1372 | __u8 *buf; | 1373 | __u8 *buf; |
1373 | 1374 | ||
1374 | field = hidinput_get_led_field(hid); | 1375 | field = hidinput_get_led_field(hid); |
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c index 3b4739bde05d..2e1736ba2444 100644 --- a/drivers/hid/hid-multitouch.c +++ b/drivers/hid/hid-multitouch.c | |||
@@ -370,7 +370,8 @@ static const struct attribute_group mt_attribute_group = { | |||
370 | static void mt_get_feature(struct hid_device *hdev, struct hid_report *report) | 370 | static void mt_get_feature(struct hid_device *hdev, struct hid_report *report) |
371 | { | 371 | { |
372 | struct mt_device *td = hid_get_drvdata(hdev); | 372 | struct mt_device *td = hid_get_drvdata(hdev); |
373 | int ret, size = hid_report_len(report); | 373 | int ret; |
374 | u32 size = hid_report_len(report); | ||
374 | u8 *buf; | 375 | u8 *buf; |
375 | 376 | ||
376 | /* | 377 | /* |
@@ -1183,7 +1184,7 @@ static void mt_set_input_mode(struct hid_device *hdev) | |||
1183 | struct hid_report_enum *re; | 1184 | struct hid_report_enum *re; |
1184 | struct mt_class *cls = &td->mtclass; | 1185 | struct mt_class *cls = &td->mtclass; |
1185 | char *buf; | 1186 | char *buf; |
1186 | int report_len; | 1187 | u32 report_len; |
1187 | 1188 | ||
1188 | if (td->inputmode < 0) | 1189 | if (td->inputmode < 0) |
1189 | return; | 1190 | return; |
diff --git a/drivers/hid/hid-rmi.c b/drivers/hid/hid-rmi.c index c6c05df3e8d2..9c9362149641 100644 --- a/drivers/hid/hid-rmi.c +++ b/drivers/hid/hid-rmi.c | |||
@@ -89,8 +89,8 @@ struct rmi_data { | |||
89 | u8 *writeReport; | 89 | u8 *writeReport; |
90 | u8 *readReport; | 90 | u8 *readReport; |
91 | 91 | ||
92 | int input_report_size; | 92 | u32 input_report_size; |
93 | int output_report_size; | 93 | u32 output_report_size; |
94 | 94 | ||
95 | unsigned long flags; | 95 | unsigned long flags; |
96 | 96 | ||
diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c index 409543160af7..b54ef1ffcbec 100644 --- a/drivers/hid/wacom_sys.c +++ b/drivers/hid/wacom_sys.c | |||
@@ -219,7 +219,7 @@ static void wacom_feature_mapping(struct hid_device *hdev, | |||
219 | unsigned int equivalent_usage = wacom_equivalent_usage(usage->hid); | 219 | unsigned int equivalent_usage = wacom_equivalent_usage(usage->hid); |
220 | u8 *data; | 220 | u8 *data; |
221 | int ret; | 221 | int ret; |
222 | int n; | 222 | u32 n; |
223 | 223 | ||
224 | switch (equivalent_usage) { | 224 | switch (equivalent_usage) { |
225 | case HID_DG_CONTACTMAX: | 225 | case HID_DG_CONTACTMAX: |
@@ -519,7 +519,7 @@ static int wacom_set_device_mode(struct hid_device *hdev, | |||
519 | u8 *rep_data; | 519 | u8 *rep_data; |
520 | struct hid_report *r; | 520 | struct hid_report *r; |
521 | struct hid_report_enum *re; | 521 | struct hid_report_enum *re; |
522 | int length; | 522 | u32 length; |
523 | int error = -ENOMEM, limit = 0; | 523 | int error = -ENOMEM, limit = 0; |
524 | 524 | ||
525 | if (wacom_wac->mode_report < 0) | 525 | if (wacom_wac->mode_report < 0) |