diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-06-14 08:59:06 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-06-14 08:59:06 +0200 |
| commit | db4e54aefdfe03f1aea82bb65d61f25c3ea035d7 (patch) | |
| tree | 1a4b30dc2b6c8ac3173ff686b36f49dee5f0bd73 /include/linux/hid.h | |
| parent | eab61fb1cc2eeeffbceb2cf891c1b7272141af82 (diff) | |
| parent | 009c9aa5be652675a06d5211e1640e02bbb1c33d (diff) | |
Merge tag 'v5.13-rc6' into char-misc-next
We need the fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/hid.h')
| -rw-r--r-- | include/linux/hid.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h index 271021e20a3f..10e922cee4eb 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -1167,8 +1167,7 @@ static inline void hid_hw_wait(struct hid_device *hdev) */ static inline u32 hid_report_len(struct hid_report *report) { - /* equivalent to DIV_ROUND_UP(report->size, 8) + !!(report->id > 0) */ - return ((report->size - 1) >> 3) + 1 + (report->id > 0); + return DIV_ROUND_UP(report->size, 8) + (report->id > 0); } int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, u32 size, |
