summaryrefslogtreecommitdiff
path: root/include/linux/hid.h
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2024-08-03 14:34:21 +0200
committerBenjamin Tissoires <bentiss@kernel.org>2024-08-27 16:18:51 +0200
commit3593630c89d7d3963c42262694f8aa8b4727a0ad (patch)
tree7048e0a91fb9ef1a8952af5444aae2ab007f5e0d /include/linux/hid.h
parent80cfb508f3fe4c7c6a567fc4aa863c9a38709cd5 (diff)
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>
Diffstat (limited to 'include/linux/hid.h')
-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 502bbc6f078c..c5fb43db0f2e 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -600,7 +600,7 @@ struct hid_driver;
struct hid_ll_driver;
struct hid_device { /* device report descriptor */
- __u8 *dev_rdesc;
+ const __u8 *dev_rdesc;
unsigned dev_rsize;
const __u8 *rdesc;
unsigned rsize;