diff options
author | Thomas Weißschuh <linux@weissschuh.net> | 2024-08-28 10:33:21 +0300 |
---|---|---|
committer | Benjamin Tissoires <bentiss@kernel.org> | 2024-09-05 17:20:56 +0300 |
commit | 49e00b5ca0bbf26cc0c7ff22415ede58b71937f3 (patch) | |
tree | cf6d965989b1273b7c8fafc4f4ff7426b1fc5006 /drivers/hid | |
parent | 00f6f65bd1162dee2e30ef11864892afcbbf2352 (diff) | |
download | linux-49e00b5ca0bbf26cc0c7ff22415ede58b71937f3.tar.xz |
HID: dr: constify fixed up report descriptor
Now that the HID core can handle const report descriptors,
constify them where possible.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240828-hid-const-fixup-2-v1-2-663b9210eb69@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-dr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hid/hid-dr.c b/drivers/hid/hid-dr.c index b24f9bc743e1..84e1e90a266b 100644 --- a/drivers/hid/hid-dr.c +++ b/drivers/hid/hid-dr.c @@ -199,7 +199,7 @@ static inline int drff_init(struct hid_device *hid) #define PID0011_RDESC_ORIG_SIZE 101 /* Fixed report descriptor for PID 0x011 joystick */ -static __u8 pid0011_rdesc_fixed[] = { +static const __u8 pid0011_rdesc_fixed[] = { 0x05, 0x01, /* Usage Page (Desktop), */ 0x09, 0x04, /* Usage (Joystick), */ 0xA1, 0x01, /* Collection (Application), */ @@ -234,8 +234,8 @@ static const __u8 *dr_report_fixup(struct hid_device *hdev, __u8 *rdesc, switch (hdev->product) { case 0x0011: if (*rsize == PID0011_RDESC_ORIG_SIZE) { - rdesc = pid0011_rdesc_fixed; *rsize = sizeof(pid0011_rdesc_fixed); + return pid0011_rdesc_fixed; } break; } |