summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-monterey.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hid/hid-monterey.c')
-rw-r--r--drivers/hid/hid-monterey.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/hid/hid-monterey.c b/drivers/hid/hid-monterey.c
index 9e14c00eb1b6..3089be990afe 100644
--- a/drivers/hid/hid-monterey.c
+++ b/drivers/hid/hid-monterey.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* HID driver for some monterey "special" devices
*
@@ -9,10 +10,6 @@
*/
/*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
*/
#include <linux/device.h>
@@ -21,10 +18,10 @@
#include "hid-ids.h"
-static __u8 *mr_report_fixup(struct hid_device *hdev, __u8 *rdesc,
+static const __u8 *mr_report_fixup(struct hid_device *hdev, __u8 *rdesc,
unsigned int *rsize)
{
- if (*rsize >= 30 && rdesc[29] == 0x05 && rdesc[30] == 0x09) {
+ if (*rsize >= 31 && rdesc[29] == 0x05 && rdesc[30] == 0x09) {
hid_info(hdev, "fixing up button/consumer in HID report descriptor\n");
rdesc[30] = 0x0c;
}
@@ -65,4 +62,5 @@ static struct hid_driver mr_driver = {
};
module_hid_driver(mr_driver);
+MODULE_DESCRIPTION("HID driver for some monterey \"special\" devices");
MODULE_LICENSE("GPL");