summaryrefslogtreecommitdiff
path: root/include/linux/hid.h
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2024-08-03 15:34:20 +0300
committerBenjamin Tissoires <bentiss@kernel.org>2024-08-27 17:18:51 +0300
commit80cfb508f3fe4c7c6a567fc4aa863c9a38709cd5 (patch)
treeecd055cb977d58734a02374230052abf4e39ba39 /include/linux/hid.h
parent24ddd0d7de7aaf50f537fd727f31616cb5a65a9e (diff)
downloadlinux-80cfb508f3fe4c7c6a567fc4aa863c9a38709cd5.tar.xz
HID: constify params and return value of fetch_item()
fetch_item() does not modify the descriptor it operates on. As a prerequisite for the constification of hid_driver::dev_rdesc, mark the parameters and return value of fetch_item() as const. Also adapt the variable types in the callers to match this constification. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://patch.msgid.link/20240803-hid-const-fixup-v2-4-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 dda34d8cad19..502bbc6f078c 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -46,7 +46,7 @@ struct hid_item {
__s16 s16;
__u32 u32;
__s32 s32;
- __u8 *longdata;
+ const __u8 *longdata;
} data;
};