diff options
-rw-r--r-- | drivers/hid/hid-axff.c | 11 | ||||
-rw-r--r-- | drivers/hid/hid-dr.c | 12 | ||||
-rw-r--r-- | drivers/hid/hid-emsff.c | 12 | ||||
-rw-r--r-- | drivers/hid/hid-gaff.c | 12 | ||||
-rw-r--r-- | drivers/hid/hid-holtekff.c | 12 | ||||
-rw-r--r-- | drivers/hid/hid-lg2ff.c | 12 | ||||
-rw-r--r-- | drivers/hid/hid-lg3ff.c | 11 | ||||
-rw-r--r-- | drivers/hid/hid-lg4ff.c | 11 | ||||
-rw-r--r-- | drivers/hid/hid-lgff.c | 11 | ||||
-rw-r--r-- | drivers/hid/hid-logitech-hidpp.c | 11 | ||||
-rw-r--r-- | drivers/hid/hid-microsoft.c | 12 | ||||
-rw-r--r-- | drivers/hid/hid-sony.c | 12 | ||||
-rw-r--r-- | drivers/hid/hid-tmff.c | 12 | ||||
-rw-r--r-- | drivers/hid/hid-zpff.c | 12 |
14 files changed, 126 insertions, 37 deletions
diff --git a/drivers/hid/hid-axff.c b/drivers/hid/hid-axff.c index 6654c1550e2e..fbe4e16ab029 100644 --- a/drivers/hid/hid-axff.c +++ b/drivers/hid/hid-axff.c | |||
@@ -63,13 +63,20 @@ static int axff_init(struct hid_device *hid) | |||
63 | { | 63 | { |
64 | struct axff_device *axff; | 64 | struct axff_device *axff; |
65 | struct hid_report *report; | 65 | struct hid_report *report; |
66 | struct hid_input *hidinput = list_first_entry(&hid->inputs, struct hid_input, list); | 66 | struct hid_input *hidinput; |
67 | struct list_head *report_list =&hid->report_enum[HID_OUTPUT_REPORT].report_list; | 67 | struct list_head *report_list =&hid->report_enum[HID_OUTPUT_REPORT].report_list; |
68 | struct input_dev *dev = hidinput->input; | 68 | struct input_dev *dev; |
69 | int field_count = 0; | 69 | int field_count = 0; |
70 | int i, j; | 70 | int i, j; |
71 | int error; | 71 | int error; |
72 | 72 | ||
73 | if (list_empty(&hid->inputs)) { | ||
74 | hid_err(hid, "no inputs found\n"); | ||
75 | return -ENODEV; | ||
76 | } | ||
77 | hidinput = list_first_entry(&hid->inputs, struct hid_input, list); | ||
78 | dev = hidinput->input; | ||
79 | |||
73 | if (list_empty(report_list)) { | 80 | if (list_empty(report_list)) { |
74 | hid_err(hid, "no output reports found\n"); | 81 | hid_err(hid, "no output reports found\n"); |
75 | return -ENODEV; | 82 | return -ENODEV; |
diff --git a/drivers/hid/hid-dr.c b/drivers/hid/hid-dr.c index 17e17f9a597b..947f19f8685f 100644 --- a/drivers/hid/hid-dr.c +++ b/drivers/hid/hid-dr.c | |||
@@ -75,13 +75,19 @@ static int drff_init(struct hid_device *hid) | |||
75 | { | 75 | { |
76 | struct drff_device *drff; | 76 | struct drff_device *drff; |
77 | struct hid_report *report; | 77 | struct hid_report *report; |
78 | struct hid_input *hidinput = list_first_entry(&hid->inputs, | 78 | struct hid_input *hidinput; |
79 | struct hid_input, list); | ||
80 | struct list_head *report_list = | 79 | struct list_head *report_list = |
81 | &hid->report_enum[HID_OUTPUT_REPORT].report_list; | 80 | &hid->report_enum[HID_OUTPUT_REPORT].report_list; |
82 | struct input_dev *dev = hidinput->input; | 81 | struct input_dev *dev; |
83 | int error; | 82 | int error; |
84 | 83 | ||
84 | if (list_empty(&hid->inputs)) { | ||
85 | hid_err(hid, "no inputs found\n"); | ||
86 | return -ENODEV; | ||
87 | } | ||
88 | hidinput = list_first_entry(&hid->inputs, struct hid_input, list); | ||
89 | dev = hidinput->input; | ||
90 | |||
85 | if (list_empty(report_list)) { | 91 | if (list_empty(report_list)) { |
86 | hid_err(hid, "no output reports found\n"); | 92 | hid_err(hid, "no output reports found\n"); |
87 | return -ENODEV; | 93 | return -ENODEV; |
diff --git a/drivers/hid/hid-emsff.c b/drivers/hid/hid-emsff.c index 7cd5651872d3..c34f2e5a049f 100644 --- a/drivers/hid/hid-emsff.c +++ b/drivers/hid/hid-emsff.c | |||
@@ -47,13 +47,19 @@ static int emsff_init(struct hid_device *hid) | |||
47 | { | 47 | { |
48 | struct emsff_device *emsff; | 48 | struct emsff_device *emsff; |
49 | struct hid_report *report; | 49 | struct hid_report *report; |
50 | struct hid_input *hidinput = list_first_entry(&hid->inputs, | 50 | struct hid_input *hidinput; |
51 | struct hid_input, list); | ||
52 | struct list_head *report_list = | 51 | struct list_head *report_list = |
53 | &hid->report_enum[HID_OUTPUT_REPORT].report_list; | 52 | &hid->report_enum[HID_OUTPUT_REPORT].report_list; |
54 | struct input_dev *dev = hidinput->input; | 53 | struct input_dev *dev; |
55 | int error; | 54 | int error; |
56 | 55 | ||
56 | if (list_empty(&hid->inputs)) { | ||
57 | hid_err(hid, "no inputs found\n"); | ||
58 | return -ENODEV; | ||
59 | } | ||
60 | hidinput = list_first_entry(&hid->inputs, struct hid_input, list); | ||
61 | dev = hidinput->input; | ||
62 | |||
57 | if (list_empty(report_list)) { | 63 | if (list_empty(report_list)) { |
58 | hid_err(hid, "no output reports found\n"); | 64 | hid_err(hid, "no output reports found\n"); |
59 | return -ENODEV; | 65 | return -ENODEV; |
diff --git a/drivers/hid/hid-gaff.c b/drivers/hid/hid-gaff.c index 0f95c96b70f8..ecbd3995a4eb 100644 --- a/drivers/hid/hid-gaff.c +++ b/drivers/hid/hid-gaff.c | |||
@@ -64,14 +64,20 @@ static int gaff_init(struct hid_device *hid) | |||
64 | { | 64 | { |
65 | struct gaff_device *gaff; | 65 | struct gaff_device *gaff; |
66 | struct hid_report *report; | 66 | struct hid_report *report; |
67 | struct hid_input *hidinput = list_entry(hid->inputs.next, | 67 | struct hid_input *hidinput; |
68 | struct hid_input, list); | ||
69 | struct list_head *report_list = | 68 | struct list_head *report_list = |
70 | &hid->report_enum[HID_OUTPUT_REPORT].report_list; | 69 | &hid->report_enum[HID_OUTPUT_REPORT].report_list; |
71 | struct list_head *report_ptr = report_list; | 70 | struct list_head *report_ptr = report_list; |
72 | struct input_dev *dev = hidinput->input; | 71 | struct input_dev *dev; |
73 | int error; | 72 | int error; |
74 | 73 | ||
74 | if (list_empty(&hid->inputs)) { | ||
75 | hid_err(hid, "no inputs found\n"); | ||
76 | return -ENODEV; | ||
77 | } | ||
78 | hidinput = list_entry(hid->inputs.next, struct hid_input, list); | ||
79 | dev = hidinput->input; | ||
80 | |||
75 | if (list_empty(report_list)) { | 81 | if (list_empty(report_list)) { |
76 | hid_err(hid, "no output reports found\n"); | 82 | hid_err(hid, "no output reports found\n"); |
77 | return -ENODEV; | 83 | return -ENODEV; |
diff --git a/drivers/hid/hid-holtekff.c b/drivers/hid/hid-holtekff.c index 10a720558830..8619b80c834c 100644 --- a/drivers/hid/hid-holtekff.c +++ b/drivers/hid/hid-holtekff.c | |||
@@ -124,13 +124,19 @@ static int holtekff_init(struct hid_device *hid) | |||
124 | { | 124 | { |
125 | struct holtekff_device *holtekff; | 125 | struct holtekff_device *holtekff; |
126 | struct hid_report *report; | 126 | struct hid_report *report; |
127 | struct hid_input *hidinput = list_entry(hid->inputs.next, | 127 | struct hid_input *hidinput; |
128 | struct hid_input, list); | ||
129 | struct list_head *report_list = | 128 | struct list_head *report_list = |
130 | &hid->report_enum[HID_OUTPUT_REPORT].report_list; | 129 | &hid->report_enum[HID_OUTPUT_REPORT].report_list; |
131 | struct input_dev *dev = hidinput->input; | 130 | struct input_dev *dev; |
132 | int error; | 131 | int error; |
133 | 132 | ||
133 | if (list_empty(&hid->inputs)) { | ||
134 | hid_err(hid, "no inputs found\n"); | ||
135 | return -ENODEV; | ||
136 | } | ||
137 | hidinput = list_entry(hid->inputs.next, struct hid_input, list); | ||
138 | dev = hidinput->input; | ||
139 | |||
134 | if (list_empty(report_list)) { | 140 | if (list_empty(report_list)) { |
135 | hid_err(hid, "no output report found\n"); | 141 | hid_err(hid, "no output report found\n"); |
136 | return -ENODEV; | 142 | return -ENODEV; |
diff --git a/drivers/hid/hid-lg2ff.c b/drivers/hid/hid-lg2ff.c index dd1a6c3a7de6..73d07e35f12a 100644 --- a/drivers/hid/hid-lg2ff.c +++ b/drivers/hid/hid-lg2ff.c | |||
@@ -50,11 +50,17 @@ int lg2ff_init(struct hid_device *hid) | |||
50 | { | 50 | { |
51 | struct lg2ff_device *lg2ff; | 51 | struct lg2ff_device *lg2ff; |
52 | struct hid_report *report; | 52 | struct hid_report *report; |
53 | struct hid_input *hidinput = list_entry(hid->inputs.next, | 53 | struct hid_input *hidinput; |
54 | struct hid_input, list); | 54 | struct input_dev *dev; |
55 | struct input_dev *dev = hidinput->input; | ||
56 | int error; | 55 | int error; |
57 | 56 | ||
57 | if (list_empty(&hid->inputs)) { | ||
58 | hid_err(hid, "no inputs found\n"); | ||
59 | return -ENODEV; | ||
60 | } | ||
61 | hidinput = list_entry(hid->inputs.next, struct hid_input, list); | ||
62 | dev = hidinput->input; | ||
63 | |||
58 | /* Check that the report looks ok */ | 64 | /* Check that the report looks ok */ |
59 | report = hid_validate_values(hid, HID_OUTPUT_REPORT, 0, 0, 7); | 65 | report = hid_validate_values(hid, HID_OUTPUT_REPORT, 0, 0, 7); |
60 | if (!report) | 66 | if (!report) |
diff --git a/drivers/hid/hid-lg3ff.c b/drivers/hid/hid-lg3ff.c index 9ecb6fd06203..b7e1949f3cf7 100644 --- a/drivers/hid/hid-lg3ff.c +++ b/drivers/hid/hid-lg3ff.c | |||
@@ -117,12 +117,19 @@ static const signed short ff3_joystick_ac[] = { | |||
117 | 117 | ||
118 | int lg3ff_init(struct hid_device *hid) | 118 | int lg3ff_init(struct hid_device *hid) |
119 | { | 119 | { |
120 | struct hid_input *hidinput = list_entry(hid->inputs.next, struct hid_input, list); | 120 | struct hid_input *hidinput; |
121 | struct input_dev *dev = hidinput->input; | 121 | struct input_dev *dev; |
122 | const signed short *ff_bits = ff3_joystick_ac; | 122 | const signed short *ff_bits = ff3_joystick_ac; |
123 | int error; | 123 | int error; |
124 | int i; | 124 | int i; |
125 | 125 | ||
126 | if (list_empty(&hid->inputs)) { | ||
127 | hid_err(hid, "no inputs found\n"); | ||
128 | return -ENODEV; | ||
129 | } | ||
130 | hidinput = list_entry(hid->inputs.next, struct hid_input, list); | ||
131 | dev = hidinput->input; | ||
132 | |||
126 | /* Check that the report looks ok */ | 133 | /* Check that the report looks ok */ |
127 | if (!hid_validate_values(hid, HID_OUTPUT_REPORT, 0, 0, 35)) | 134 | if (!hid_validate_values(hid, HID_OUTPUT_REPORT, 0, 0, 35)) |
128 | return -ENODEV; | 135 | return -ENODEV; |
diff --git a/drivers/hid/hid-lg4ff.c b/drivers/hid/hid-lg4ff.c index 03f0220062ca..5e6a0cef2a06 100644 --- a/drivers/hid/hid-lg4ff.c +++ b/drivers/hid/hid-lg4ff.c | |||
@@ -1253,8 +1253,8 @@ static int lg4ff_handle_multimode_wheel(struct hid_device *hid, u16 *real_produc | |||
1253 | 1253 | ||
1254 | int lg4ff_init(struct hid_device *hid) | 1254 | int lg4ff_init(struct hid_device *hid) |
1255 | { | 1255 | { |
1256 | struct hid_input *hidinput = list_entry(hid->inputs.next, struct hid_input, list); | 1256 | struct hid_input *hidinput; |
1257 | struct input_dev *dev = hidinput->input; | 1257 | struct input_dev *dev; |
1258 | struct list_head *report_list = &hid->report_enum[HID_OUTPUT_REPORT].report_list; | 1258 | struct list_head *report_list = &hid->report_enum[HID_OUTPUT_REPORT].report_list; |
1259 | struct hid_report *report = list_entry(report_list->next, struct hid_report, list); | 1259 | struct hid_report *report = list_entry(report_list->next, struct hid_report, list); |
1260 | const struct usb_device_descriptor *udesc = &(hid_to_usb_dev(hid)->descriptor); | 1260 | const struct usb_device_descriptor *udesc = &(hid_to_usb_dev(hid)->descriptor); |
@@ -1266,6 +1266,13 @@ int lg4ff_init(struct hid_device *hid) | |||
1266 | int mmode_ret, mmode_idx = -1; | 1266 | int mmode_ret, mmode_idx = -1; |
1267 | u16 real_product_id; | 1267 | u16 real_product_id; |
1268 | 1268 | ||
1269 | if (list_empty(&hid->inputs)) { | ||
1270 | hid_err(hid, "no inputs found\n"); | ||
1271 | return -ENODEV; | ||
1272 | } | ||
1273 | hidinput = list_entry(hid->inputs.next, struct hid_input, list); | ||
1274 | dev = hidinput->input; | ||
1275 | |||
1269 | /* Check that the report looks ok */ | 1276 | /* Check that the report looks ok */ |
1270 | if (!hid_validate_values(hid, HID_OUTPUT_REPORT, 0, 0, 7)) | 1277 | if (!hid_validate_values(hid, HID_OUTPUT_REPORT, 0, 0, 7)) |
1271 | return -1; | 1278 | return -1; |
diff --git a/drivers/hid/hid-lgff.c b/drivers/hid/hid-lgff.c index c79a6ec43745..aed4ddc397a9 100644 --- a/drivers/hid/hid-lgff.c +++ b/drivers/hid/hid-lgff.c | |||
@@ -115,12 +115,19 @@ static void hid_lgff_set_autocenter(struct input_dev *dev, u16 magnitude) | |||
115 | 115 | ||
116 | int lgff_init(struct hid_device* hid) | 116 | int lgff_init(struct hid_device* hid) |
117 | { | 117 | { |
118 | struct hid_input *hidinput = list_entry(hid->inputs.next, struct hid_input, list); | 118 | struct hid_input *hidinput; |
119 | struct input_dev *dev = hidinput->input; | 119 | struct input_dev *dev; |
120 | const signed short *ff_bits = ff_joystick; | 120 | const signed short *ff_bits = ff_joystick; |
121 | int error; | 121 | int error; |
122 | int i; | 122 | int i; |
123 | 123 | ||
124 | if (list_empty(&hid->inputs)) { | ||
125 | hid_err(hid, "no inputs found\n"); | ||
126 | return -ENODEV; | ||
127 | } | ||
128 | hidinput = list_entry(hid->inputs.next, struct hid_input, list); | ||
129 | dev = hidinput->input; | ||
130 | |||
124 | /* Check that the report looks ok */ | 131 | /* Check that the report looks ok */ |
125 | if (!hid_validate_values(hid, HID_OUTPUT_REPORT, 0, 0, 7)) | 132 | if (!hid_validate_values(hid, HID_OUTPUT_REPORT, 0, 0, 7)) |
126 | return -ENODEV; | 133 | return -ENODEV; |
diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c index 0179f7ed77e5..1ac1ecc1e67c 100644 --- a/drivers/hid/hid-logitech-hidpp.c +++ b/drivers/hid/hid-logitech-hidpp.c | |||
@@ -2084,8 +2084,8 @@ static void hidpp_ff_destroy(struct ff_device *ff) | |||
2084 | static int hidpp_ff_init(struct hidpp_device *hidpp, u8 feature_index) | 2084 | static int hidpp_ff_init(struct hidpp_device *hidpp, u8 feature_index) |
2085 | { | 2085 | { |
2086 | struct hid_device *hid = hidpp->hid_dev; | 2086 | struct hid_device *hid = hidpp->hid_dev; |
2087 | struct hid_input *hidinput = list_entry(hid->inputs.next, struct hid_input, list); | 2087 | struct hid_input *hidinput; |
2088 | struct input_dev *dev = hidinput->input; | 2088 | struct input_dev *dev; |
2089 | const struct usb_device_descriptor *udesc = &(hid_to_usb_dev(hid)->descriptor); | 2089 | const struct usb_device_descriptor *udesc = &(hid_to_usb_dev(hid)->descriptor); |
2090 | const u16 bcdDevice = le16_to_cpu(udesc->bcdDevice); | 2090 | const u16 bcdDevice = le16_to_cpu(udesc->bcdDevice); |
2091 | struct ff_device *ff; | 2091 | struct ff_device *ff; |
@@ -2094,6 +2094,13 @@ static int hidpp_ff_init(struct hidpp_device *hidpp, u8 feature_index) | |||
2094 | int error, j, num_slots; | 2094 | int error, j, num_slots; |
2095 | u8 version; | 2095 | u8 version; |
2096 | 2096 | ||
2097 | if (list_empty(&hid->inputs)) { | ||
2098 | hid_err(hid, "no inputs found\n"); | ||
2099 | return -ENODEV; | ||
2100 | } | ||
2101 | hidinput = list_entry(hid->inputs.next, struct hid_input, list); | ||
2102 | dev = hidinput->input; | ||
2103 | |||
2097 | if (!dev) { | 2104 | if (!dev) { |
2098 | hid_err(hid, "Struct input_dev not set!\n"); | 2105 | hid_err(hid, "Struct input_dev not set!\n"); |
2099 | return -EINVAL; | 2106 | return -EINVAL; |
diff --git a/drivers/hid/hid-microsoft.c b/drivers/hid/hid-microsoft.c index 2cf83856f2e4..2d8b589201a4 100644 --- a/drivers/hid/hid-microsoft.c +++ b/drivers/hid/hid-microsoft.c | |||
@@ -328,11 +328,17 @@ static int ms_play_effect(struct input_dev *dev, void *data, | |||
328 | 328 | ||
329 | static int ms_init_ff(struct hid_device *hdev) | 329 | static int ms_init_ff(struct hid_device *hdev) |
330 | { | 330 | { |
331 | struct hid_input *hidinput = list_entry(hdev->inputs.next, | 331 | struct hid_input *hidinput; |
332 | struct hid_input, list); | 332 | struct input_dev *input_dev; |
333 | struct input_dev *input_dev = hidinput->input; | ||
334 | struct ms_data *ms = hid_get_drvdata(hdev); | 333 | struct ms_data *ms = hid_get_drvdata(hdev); |
335 | 334 | ||
335 | if (list_empty(&hdev->inputs)) { | ||
336 | hid_err(hdev, "no inputs found\n"); | ||
337 | return -ENODEV; | ||
338 | } | ||
339 | hidinput = list_entry(hdev->inputs.next, struct hid_input, list); | ||
340 | input_dev = hidinput->input; | ||
341 | |||
336 | if (!(ms->quirks & MS_QUIRK_FF)) | 342 | if (!(ms->quirks & MS_QUIRK_FF)) |
337 | return 0; | 343 | return 0; |
338 | 344 | ||
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c index 73c0f7a95e2d..4c6ed6ef31f1 100644 --- a/drivers/hid/hid-sony.c +++ b/drivers/hid/hid-sony.c | |||
@@ -2254,9 +2254,15 @@ static int sony_play_effect(struct input_dev *dev, void *data, | |||
2254 | 2254 | ||
2255 | static int sony_init_ff(struct sony_sc *sc) | 2255 | static int sony_init_ff(struct sony_sc *sc) |
2256 | { | 2256 | { |
2257 | struct hid_input *hidinput = list_entry(sc->hdev->inputs.next, | 2257 | struct hid_input *hidinput; |
2258 | struct hid_input, list); | 2258 | struct input_dev *input_dev; |
2259 | struct input_dev *input_dev = hidinput->input; | 2259 | |
2260 | if (list_empty(&sc->hdev->inputs)) { | ||
2261 | hid_err(sc->hdev, "no inputs found\n"); | ||
2262 | return -ENODEV; | ||
2263 | } | ||
2264 | hidinput = list_entry(sc->hdev->inputs.next, struct hid_input, list); | ||
2265 | input_dev = hidinput->input; | ||
2260 | 2266 | ||
2261 | input_set_capability(input_dev, EV_FF, FF_RUMBLE); | 2267 | input_set_capability(input_dev, EV_FF, FF_RUMBLE); |
2262 | return input_ff_create_memless(input_dev, NULL, sony_play_effect); | 2268 | return input_ff_create_memless(input_dev, NULL, sony_play_effect); |
diff --git a/drivers/hid/hid-tmff.c b/drivers/hid/hid-tmff.c index bdfc5ff3b2c5..90acef304536 100644 --- a/drivers/hid/hid-tmff.c +++ b/drivers/hid/hid-tmff.c | |||
@@ -124,12 +124,18 @@ static int tmff_init(struct hid_device *hid, const signed short *ff_bits) | |||
124 | struct tmff_device *tmff; | 124 | struct tmff_device *tmff; |
125 | struct hid_report *report; | 125 | struct hid_report *report; |
126 | struct list_head *report_list; | 126 | struct list_head *report_list; |
127 | struct hid_input *hidinput = list_entry(hid->inputs.next, | 127 | struct hid_input *hidinput; |
128 | struct hid_input, list); | 128 | struct input_dev *input_dev; |
129 | struct input_dev *input_dev = hidinput->input; | ||
130 | int error; | 129 | int error; |
131 | int i; | 130 | int i; |
132 | 131 | ||
132 | if (list_empty(&hid->inputs)) { | ||
133 | hid_err(hid, "no inputs found\n"); | ||
134 | return -ENODEV; | ||
135 | } | ||
136 | hidinput = list_entry(hid->inputs.next, struct hid_input, list); | ||
137 | input_dev = hidinput->input; | ||
138 | |||
133 | tmff = kzalloc(sizeof(struct tmff_device), GFP_KERNEL); | 139 | tmff = kzalloc(sizeof(struct tmff_device), GFP_KERNEL); |
134 | if (!tmff) | 140 | if (!tmff) |
135 | return -ENOMEM; | 141 | return -ENOMEM; |
diff --git a/drivers/hid/hid-zpff.c b/drivers/hid/hid-zpff.c index f90959e94028..3abaca045869 100644 --- a/drivers/hid/hid-zpff.c +++ b/drivers/hid/hid-zpff.c | |||
@@ -54,11 +54,17 @@ static int zpff_init(struct hid_device *hid) | |||
54 | { | 54 | { |
55 | struct zpff_device *zpff; | 55 | struct zpff_device *zpff; |
56 | struct hid_report *report; | 56 | struct hid_report *report; |
57 | struct hid_input *hidinput = list_entry(hid->inputs.next, | 57 | struct hid_input *hidinput; |
58 | struct hid_input, list); | 58 | struct input_dev *dev; |
59 | struct input_dev *dev = hidinput->input; | ||
60 | int i, error; | 59 | int i, error; |
61 | 60 | ||
61 | if (list_empty(&hid->inputs)) { | ||
62 | hid_err(hid, "no inputs found\n"); | ||
63 | return -ENODEV; | ||
64 | } | ||
65 | hidinput = list_entry(hid->inputs.next, struct hid_input, list); | ||
66 | dev = hidinput->input; | ||
67 | |||
62 | for (i = 0; i < 4; i++) { | 68 | for (i = 0; i < 4; i++) { |
63 | report = hid_validate_values(hid, HID_OUTPUT_REPORT, 0, i, 1); | 69 | report = hid_validate_values(hid, HID_OUTPUT_REPORT, 0, i, 1); |
64 | if (!report) | 70 | if (!report) |