mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-16 02:14:58 +00:00
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 <linux@weissschuh.net> Link: https://patch.msgid.link/20240828-hid-const-fixup-2-v1-1-663b9210eb69@weissschuh.net Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
This commit is contained in:
parent
c1f9eff7b2
commit
00f6f65bd1
@ -99,7 +99,7 @@
|
|||||||
* - map previously unused analog trigger data to Z/RZ
|
* - map previously unused analog trigger data to Z/RZ
|
||||||
* - simplify feature and output descriptor
|
* - simplify feature and output descriptor
|
||||||
*/
|
*/
|
||||||
static __u8 pid0902_rdesc_fixed[] = {
|
static const __u8 pid0902_rdesc_fixed[] = {
|
||||||
0x05, 0x01, /* Usage Page (Generic Desktop Ctrls) */
|
0x05, 0x01, /* Usage Page (Generic Desktop Ctrls) */
|
||||||
0x09, 0x05, /* Usage (Game Pad) */
|
0x09, 0x05, /* Usage (Game Pad) */
|
||||||
0xA1, 0x01, /* Collection (Application) */
|
0xA1, 0x01, /* Collection (Application) */
|
||||||
@ -468,8 +468,8 @@ static const __u8 *bigben_report_fixup(struct hid_device *hid, __u8 *rdesc,
|
|||||||
unsigned int *rsize)
|
unsigned int *rsize)
|
||||||
{
|
{
|
||||||
if (*rsize == PID0902_RDESC_ORIG_SIZE) {
|
if (*rsize == PID0902_RDESC_ORIG_SIZE) {
|
||||||
rdesc = pid0902_rdesc_fixed;
|
|
||||||
*rsize = sizeof(pid0902_rdesc_fixed);
|
*rsize = sizeof(pid0902_rdesc_fixed);
|
||||||
|
return pid0902_rdesc_fixed;
|
||||||
} else
|
} else
|
||||||
hid_warn(hid, "unexpected rdesc, please submit for review\n");
|
hid_warn(hid, "unexpected rdesc, please submit for review\n");
|
||||||
return rdesc;
|
return rdesc;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user