aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Weißschuh <[email protected]>2024-08-03 14:34:19 +0200
committerBenjamin Tissoires <[email protected]>2024-08-27 16:18:51 +0200
commit24ddd0d7de7aaf50f537fd727f31616cb5a65a9e (patch)
treeaad035665590f1b7dd298d348166bc33b165a3f2
parent6737769ca0b6bfc82df53db5fd69068902d608db (diff)
HID: constify hid_device::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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
-rw-r--r--include/linux/hid.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h
index e7a5d6f2f2eb..dda34d8cad19 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -602,7 +602,7 @@ struct hid_ll_driver;
struct hid_device { /* device report descriptor */
__u8 *dev_rdesc;
unsigned dev_rsize;
- __u8 *rdesc;
+ const __u8 *rdesc;
unsigned rsize;
struct hid_collection *collection; /* List of HID collections */
unsigned collection_size; /* Number of allocated hid_collections */