diff options
author | Mathieu Magnaudet <mathieu.magnaudet@gmail.com> | 2014-11-27 10:02:36 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2014-12-01 15:34:17 -0500 |
commit | dabb05c6670e6e4415d7b56cd5864a5dbd90207f (patch) | |
tree | ca80d7c8cf44f32bb0c870855ae87452c8a004c3 /drivers/hid/hid-input.c | |
parent | da10bc252476a8d1d1bdf7b94502ad2cbd7f30b1 (diff) |
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>
Diffstat (limited to 'drivers/hid/hid-input.c')
-rw-r--r-- | drivers/hid/hid-input.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 725f22ca47fc..1e95f4df4146 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c | |||
@@ -1215,7 +1215,7 @@ static void hidinput_led_worker(struct work_struct *work) | |||
1215 | return hid->ll_driver->request(hid, report, HID_REQ_SET_REPORT); | 1215 | return hid->ll_driver->request(hid, report, HID_REQ_SET_REPORT); |
1216 | 1216 | ||
1217 | /* fall back to generic raw-output-report */ | 1217 | /* fall back to generic raw-output-report */ |
1218 | len = ((report->size - 1) >> 3) + 1 + (report->id > 0); | 1218 | len = hid_report_len(report); |
1219 | buf = hid_alloc_report_buf(report, GFP_KERNEL); | 1219 | buf = hid_alloc_report_buf(report, GFP_KERNEL); |
1220 | if (!buf) | 1220 | if (!buf) |
1221 | return; | 1221 | return; |