mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
HID: make hid_report_len as a static inline function in hid.h
In several hid drivers it is necessary to calculate the length of an hid_report. This patch exports the existing static function hid_report_len of hid-core.c as an inline function in hid.h Signed-off-by: Mathieu Magnaudet <mathieu.magnaudet@enac.fr> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
parent
da10bc2524
commit
dabb05c667
6 changed files with 15 additions and 17 deletions
|
@ -1215,7 +1215,7 @@ static void hidinput_led_worker(struct work_struct *work)
|
|||
return hid->ll_driver->request(hid, report, HID_REQ_SET_REPORT);
|
||||
|
||||
/* fall back to generic raw-output-report */
|
||||
len = ((report->size - 1) >> 3) + 1 + (report->id > 0);
|
||||
len = hid_report_len(report);
|
||||
buf = hid_alloc_report_buf(report, GFP_KERNEL);
|
||||
if (!buf)
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue