Commit 1a1e8c6f authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid

Pull HID fix from Jiri Kosina:
 "This has a build fix for architectures where memcmp() is macro, from
  Jiri Slaby"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: microsoft: do not use compound literal - fix build
parents ec014873 6b90466c
...@@ -46,9 +46,9 @@ static __u8 *ms_report_fixup(struct hid_device *hdev, __u8 *rdesc, ...@@ -46,9 +46,9 @@ static __u8 *ms_report_fixup(struct hid_device *hdev, __u8 *rdesc,
rdesc[559] = 0x45; rdesc[559] = 0x45;
} }
/* the same as above (s/usage/physical/) */ /* the same as above (s/usage/physical/) */
if ((quirks & MS_RDESC_3K) && *rsize == 106 && if ((quirks & MS_RDESC_3K) && *rsize == 106 && rdesc[94] == 0x19 &&
!memcmp((char []){ 0x19, 0x00, 0x29, 0xff }, rdesc[95] == 0x00 && rdesc[96] == 0x29 &&
&rdesc[94], 4)) { rdesc[97] == 0xff) {
rdesc[94] = 0x35; rdesc[94] = 0x35;
rdesc[96] = 0x45; rdesc[96] = 0x45;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment