aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-microsoft.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hid/hid-microsoft.c')
-rw-r--r--drivers/hid/hid-microsoft.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/hid/hid-microsoft.c b/drivers/hid/hid-microsoft.c
index d718b1607d0f..25b10dcad90d 100644
--- a/drivers/hid/hid-microsoft.c
+++ b/drivers/hid/hid-microsoft.c
@@ -30,7 +30,7 @@
30#define MS_NOGET 0x10 30#define MS_NOGET 0x10
31 31
32/* 32/*
33 * Microsoft Wireless Desktop Receiver (Model 1028) has several 33 * Microsoft Wireless Desktop Receiver (Model 1028) has
34 * 'Usage Min/Max' where it ought to have 'Physical Min/Max' 34 * 'Usage Min/Max' where it ought to have 'Physical Min/Max'
35 */ 35 */
36static void ms_report_fixup(struct hid_device *hdev, __u8 *rdesc, 36static void ms_report_fixup(struct hid_device *hdev, __u8 *rdesc,
@@ -38,17 +38,12 @@ static void ms_report_fixup(struct hid_device *hdev, __u8 *rdesc,
38{ 38{
39 unsigned long quirks = (unsigned long)hid_get_drvdata(hdev); 39 unsigned long quirks = (unsigned long)hid_get_drvdata(hdev);
40 40
41 if ((quirks & MS_RDESC) && rsize == 571 && rdesc[284] == 0x19 && 41 if ((quirks & MS_RDESC) && rsize == 571 && rdesc[557] == 0x19 &&
42 rdesc[286] == 0x2a && rdesc[304] == 0x19 &&
43 rdesc[306] == 0x29 && rdesc[352] == 0x1a &&
44 rdesc[355] == 0x2a && rdesc[557] == 0x19 &&
45 rdesc[559] == 0x29) { 42 rdesc[559] == 0x29) {
46 dev_info(&hdev->dev, "fixing up Microsoft Wireless Receiver " 43 dev_info(&hdev->dev, "fixing up Microsoft Wireless Receiver "
47 "Model 1028 report descriptor\n"); 44 "Model 1028 report descriptor\n");
48 rdesc[284] = rdesc[304] = rdesc[557] = 0x35; 45 rdesc[557] = 0x35;
49 rdesc[352] = 0x36; 46 rdesc[559] = 0x45;
50 rdesc[286] = rdesc[355] = 0x46;
51 rdesc[306] = rdesc[559] = 0x45;
52 } 47 }
53} 48}
54 49