1 From 3064a03b94e60388f0955fcc29f3e8a978d28f75 Mon Sep 17 00:00:00 2001
2 From: Aaron Ma <aaron.ma@canonical.com>
3 Date: Sat, 3 Feb 2018 23:57:15 +0800
4 Subject: HID: Fix hid_report_len usage
6 From: Aaron Ma <aaron.ma@canonical.com>
8 commit 3064a03b94e60388f0955fcc29f3e8a978d28f75 upstream.
10 Follow the change of return type u32 of hid_report_len,
11 fix all the types of variables those get the return value of
12 hid_report_len to u32, and all other code already uses u32.
14 Cc: stable@vger.kernel.org
15 Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
16 Signed-off-by: Jiri Kosina <jkosina@suse.cz>
17 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 drivers/hid/hid-input.c | 3 ++-
21 drivers/hid/hid-multitouch.c | 5 +++--
22 drivers/hid/hid-rmi.c | 4 ++--
23 drivers/hid/wacom_sys.c | 4 ++--
24 4 files changed, 9 insertions(+), 7 deletions(-)
26 --- a/drivers/hid/hid-input.c
27 +++ b/drivers/hid/hid-input.c
28 @@ -1368,7 +1368,8 @@ static void hidinput_led_worker(struct w
30 struct hid_field *field;
31 struct hid_report *report;
37 field = hidinput_get_led_field(hid);
38 --- a/drivers/hid/hid-multitouch.c
39 +++ b/drivers/hid/hid-multitouch.c
40 @@ -370,7 +370,8 @@ static const struct attribute_group mt_a
41 static void mt_get_feature(struct hid_device *hdev, struct hid_report *report)
43 struct mt_device *td = hid_get_drvdata(hdev);
44 - int ret, size = hid_report_len(report);
46 + u32 size = hid_report_len(report);
50 @@ -1183,7 +1184,7 @@ static void mt_set_input_mode(struct hid
51 struct hid_report_enum *re;
52 struct mt_class *cls = &td->mtclass;
57 if (td->inputmode < 0)
59 --- a/drivers/hid/hid-rmi.c
60 +++ b/drivers/hid/hid-rmi.c
61 @@ -89,8 +89,8 @@ struct rmi_data {
65 - int input_report_size;
66 - int output_report_size;
67 + u32 input_report_size;
68 + u32 output_report_size;
72 --- a/drivers/hid/wacom_sys.c
73 +++ b/drivers/hid/wacom_sys.c
74 @@ -219,7 +219,7 @@ static void wacom_feature_mapping(struct
75 unsigned int equivalent_usage = wacom_equivalent_usage(usage->hid);
81 switch (equivalent_usage) {
82 case HID_DG_CONTACTMAX:
83 @@ -519,7 +519,7 @@ static int wacom_set_device_mode(struct
86 struct hid_report_enum *re;
89 int error = -ENOMEM, limit = 0;
91 if (wacom_wac->mode_report < 0)