summaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-11-16 16:58:20 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2012-11-16 16:58:20 +0100
commit1a1e8c6fada5f6dc48aa5dad453c9d9ebfdc8218 (patch)
tree02f6a65ca2ce0ec0edc3c92e79194ccc9cca3e50 /drivers/hid
parentMerge tag 'usb-3.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/greg... (diff)
parentHID: microsoft: do not use compound literal - fix build (diff)
downloadlinux-1a1e8c6fada5f6dc48aa5dad453c9d9ebfdc8218.tar.xz
linux-1a1e8c6fada5f6dc48aa5dad453c9d9ebfdc8218.zip
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
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-microsoft.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/hid/hid-microsoft.c b/drivers/hid/hid-microsoft.c
index f676c01bb471..6fcd466d0825 100644
--- a/drivers/hid/hid-microsoft.c
+++ b/drivers/hid/hid-microsoft.c
@@ -46,9 +46,9 @@ static __u8 *ms_report_fixup(struct hid_device *hdev, __u8 *rdesc,
rdesc[559] = 0x45;
}
/* the same as above (s/usage/physical/) */
- if ((quirks & MS_RDESC_3K) && *rsize == 106 &&
- !memcmp((char []){ 0x19, 0x00, 0x29, 0xff },
- &rdesc[94], 4)) {
+ if ((quirks & MS_RDESC_3K) && *rsize == 106 && rdesc[94] == 0x19 &&
+ rdesc[95] == 0x00 && rdesc[96] == 0x29 &&
+ rdesc[97] == 0xff) {
rdesc[94] = 0x35;
rdesc[96] = 0x45;
}