diff options
author | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2014-02-20 15:24:48 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2014-02-24 11:23:14 -0500 |
commit | 2ebaebcf31096f83401c850393e93bc8f28db0e9 (patch) | |
tree | 456bd6b19ef89ce7411c9057ef1a1cd6b31d6349 | |
parent | 5318251744b2c8a288f91f4e53ed69f2a01d6412 (diff) |
HID: input: hid-input remove hid_output_raw_report call
hid_output_raw_report() is not a ll_driver callback and should not be used.
To keep the same code path than before, we are forced to play with the
different hid_hw_* calls: if the usb or i2c device does not support
direct output reports, then we will rely on the SET_REPORT HID call.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r-- | drivers/hid/hid-input.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 15959fbae268..310b96779e8e 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c | |||
@@ -1150,7 +1150,7 @@ static void hidinput_led_worker(struct work_struct *work) | |||
1150 | led_work); | 1150 | led_work); |
1151 | struct hid_field *field; | 1151 | struct hid_field *field; |
1152 | struct hid_report *report; | 1152 | struct hid_report *report; |
1153 | int len; | 1153 | int len, ret; |
1154 | __u8 *buf; | 1154 | __u8 *buf; |
1155 | 1155 | ||
1156 | field = hidinput_get_led_field(hid); | 1156 | field = hidinput_get_led_field(hid); |
@@ -1184,7 +1184,10 @@ static void hidinput_led_worker(struct work_struct *work) | |||
1184 | 1184 | ||
1185 | hid_output_report(report, buf); | 1185 | hid_output_report(report, buf); |
1186 | /* synchronous output report */ | 1186 | /* synchronous output report */ |
1187 | hid_output_raw_report(hid, buf, len, HID_OUTPUT_REPORT); | 1187 | ret = hid_hw_output_report(hid, buf, len); |
1188 | if (ret == -ENOSYS) | ||
1189 | hid_hw_raw_request(hid, report->id, buf, len, HID_OUTPUT_REPORT, | ||
1190 | HID_REQ_SET_REPORT); | ||
1188 | kfree(buf); | 1191 | kfree(buf); |
1189 | } | 1192 | } |
1190 | 1193 | ||
@@ -1263,7 +1266,8 @@ static struct hid_input *hidinput_allocate(struct hid_device *hid) | |||
1263 | } | 1266 | } |
1264 | 1267 | ||
1265 | input_set_drvdata(input_dev, hid); | 1268 | input_set_drvdata(input_dev, hid); |
1266 | if (hid->ll_driver->request || hid->hid_output_raw_report) | 1269 | if (hid->ll_driver->request || hid->ll_driver->output_report || |
1270 | hid->ll_driver->raw_request) | ||
1267 | input_dev->event = hidinput_input_event; | 1271 | input_dev->event = hidinput_input_event; |
1268 | input_dev->open = hidinput_open; | 1272 | input_dev->open = hidinput_open; |
1269 | input_dev->close = hidinput_close; | 1273 | input_dev->close = hidinput_close; |