diff options
author | Thomas Weißschuh <linux@weissschuh.net> | 2024-08-28 10:33:28 +0300 |
---|---|---|
committer | Benjamin Tissoires <bentiss@kernel.org> | 2024-09-05 17:20:57 +0300 |
commit | 88ae9ffc7c85c1b6b845f51e5fd850d092e75cd5 (patch) | |
tree | bd784e3472db6d789c82ca53ae4795aed4e329e6 /drivers/hid | |
parent | 4f3ff3a275f9ab016cde5561bc1b53c581fc8734 (diff) | |
download | linux-88ae9ffc7c85c1b6b845f51e5fd850d092e75cd5.tar.xz |
HID: steelseries: 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-9-663b9210eb69@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-steelseries.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hid/hid-steelseries.c b/drivers/hid/hid-steelseries.c index 895da49e8ead..7e83fee1ffa0 100644 --- a/drivers/hid/hid-steelseries.c +++ b/drivers/hid/hid-steelseries.c @@ -51,7 +51,7 @@ struct steelseries_srws1_data { * appear in the 'Generic Desktop' usage. */ -static __u8 steelseries_srws1_rdesc_fixed[] = { +static const __u8 steelseries_srws1_rdesc_fixed[] = { 0x05, 0x01, /* Usage Page (Desktop) */ 0x09, 0x08, /* Usage (MultiAxis), Changed */ 0xA1, 0x01, /* Collection (Application), */ @@ -580,8 +580,8 @@ static const __u8 *steelseries_srws1_report_fixup(struct hid_device *hdev, if (*rsize >= 115 && rdesc[11] == 0x02 && rdesc[13] == 0xc8 && rdesc[29] == 0xbb && rdesc[40] == 0xc5) { hid_info(hdev, "Fixing up Steelseries SRW-S1 report descriptor\n"); - rdesc = steelseries_srws1_rdesc_fixed; *rsize = sizeof(steelseries_srws1_rdesc_fixed); + return steelseries_srws1_rdesc_fixed; } return rdesc; } |