Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

HID: constify hid_device::dev_rdesc

Once a report descriptor has been created by the HID core it is not
supposed to be modified anymore.
Enforce this invariant through the type system.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240803-hid-const-fixup-v2-5-f53d7a7b29d8@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>

authored by

Thomas Weißschuh and committed by
Benjamin Tissoires
3593630c 80cfb508

+1 -1
+1 -1
include/linux/hid.h
··· 600 600 struct hid_ll_driver; 601 601 602 602 struct hid_device { /* device report descriptor */ 603 - __u8 *dev_rdesc; 603 + const __u8 *dev_rdesc; 604 604 unsigned dev_rsize; 605 605 const __u8 *rdesc; 606 606 unsigned rsize;