Skip to content

Commit 88ae9ff

Browse files
t-8chBenjamin Tissoires
authored andcommitted
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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
1 parent 4f3ff3a commit 88ae9ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/hid/hid-steelseries.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ struct steelseries_srws1_data {
5151
* appear in the 'Generic Desktop' usage.
5252
*/
5353

54-
static __u8 steelseries_srws1_rdesc_fixed[] = {
54+
static const __u8 steelseries_srws1_rdesc_fixed[] = {
5555
0x05, 0x01, /* Usage Page (Desktop) */
5656
0x09, 0x08, /* Usage (MultiAxis), Changed */
5757
0xA1, 0x01, /* Collection (Application), */
@@ -580,8 +580,8 @@ static const __u8 *steelseries_srws1_report_fixup(struct hid_device *hdev,
580580
if (*rsize >= 115 && rdesc[11] == 0x02 && rdesc[13] == 0xc8
581581
&& rdesc[29] == 0xbb && rdesc[40] == 0xc5) {
582582
hid_info(hdev, "Fixing up Steelseries SRW-S1 report descriptor\n");
583-
rdesc = steelseries_srws1_rdesc_fixed;
584583
*rsize = sizeof(steelseries_srws1_rdesc_fixed);
584+
return steelseries_srws1_rdesc_fixed;
585585
}
586586
return rdesc;
587587
}

0 commit comments

Comments
 (0)