Skip to content

Commit 00f6f65

Browse files
t-8chBenjamin Tissoires
authored andcommitted
HID: bigbenff: 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 c1f9eff commit 00f6f65

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/hid/hid-bigbenff.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
* - map previously unused analog trigger data to Z/RZ
100100
* - simplify feature and output descriptor
101101
*/
102-
static __u8 pid0902_rdesc_fixed[] = {
102+
static const __u8 pid0902_rdesc_fixed[] = {
103103
0x05, 0x01, /* Usage Page (Generic Desktop Ctrls) */
104104
0x09, 0x05, /* Usage (Game Pad) */
105105
0xA1, 0x01, /* Collection (Application) */
@@ -468,8 +468,8 @@ static const __u8 *bigben_report_fixup(struct hid_device *hid, __u8 *rdesc,
468468
unsigned int *rsize)
469469
{
470470
if (*rsize == PID0902_RDESC_ORIG_SIZE) {
471-
rdesc = pid0902_rdesc_fixed;
472471
*rsize = sizeof(pid0902_rdesc_fixed);
472+
return pid0902_rdesc_fixed;
473473
} else
474474
hid_warn(hid, "unexpected rdesc, please submit for review\n");
475475
return rdesc;

0 commit comments

Comments
 (0)