Skip to content

Commit d4781a2

Browse files
t-8chBenjamin Tissoires
authored andcommitted
HID: sony: 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 4211f9b commit d4781a2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/hid/hid-sony.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ static const char ghl_ps4_magic_data[] = {
9999
};
100100

101101
/* PS/3 Motion controller */
102-
static u8 motion_rdesc[] = {
102+
static const u8 motion_rdesc[] = {
103103
0x05, 0x01, /* Usage Page (Desktop), */
104104
0x09, 0x04, /* Usage (Joystick), */
105105
0xA1, 0x01, /* Collection (Application), */
@@ -195,7 +195,7 @@ static u8 motion_rdesc[] = {
195195
0xC0 /* End Collection */
196196
};
197197

198-
static u8 ps3remote_rdesc[] = {
198+
static const u8 ps3remote_rdesc[] = {
199199
0x05, 0x01, /* GUsagePage Generic Desktop */
200200
0x09, 0x05, /* LUsage 0x05 [Game Pad] */
201201
0xA1, 0x01, /* MCollection Application (mouse, keyboard) */
@@ -599,15 +599,15 @@ static int guitar_mapping(struct hid_device *hdev, struct hid_input *hi,
599599
return 0;
600600
}
601601

602-
static u8 *motion_fixup(struct hid_device *hdev, u8 *rdesc,
603-
unsigned int *rsize)
602+
static const u8 *motion_fixup(struct hid_device *hdev, u8 *rdesc,
603+
unsigned int *rsize)
604604
{
605605
*rsize = sizeof(motion_rdesc);
606606
return motion_rdesc;
607607
}
608608

609-
static u8 *ps3remote_fixup(struct hid_device *hdev, u8 *rdesc,
610-
unsigned int *rsize)
609+
static const u8 *ps3remote_fixup(struct hid_device *hdev, u8 *rdesc,
610+
unsigned int *rsize)
611611
{
612612
*rsize = sizeof(ps3remote_rdesc);
613613
return ps3remote_rdesc;

0 commit comments

Comments
 (0)