summaryrefslogtreecommitdiff
path: root/include/linux/hid.h
diff options
context:
space:
mode:
authorBenjamin Tissoires <bentiss@kernel.org>2024-09-13 15:14:56 +0200
committerBenjamin Tissoires <bentiss@kernel.org>2024-09-13 15:14:56 +0200
commit054e0bd3457735ee03879c49e36f15f649fe9c86 (patch)
tree48fd781e9da238825ad979203c2a9ea994e4024a /include/linux/hid.h
parent37c25a50313c4f11904c403dd55b06a539ba349f (diff)
parent9f5305ed80108a7849b3b27e1a889a7afff46a51 (diff)
Merge branch 'for-6.12/constify-rdesc' into for-linus
- Constification of report descriptors so drivers can use read-only memory when declaring report descriptors fixups (Thomas Weißschuh)
Diffstat (limited to 'include/linux/hid.h')
-rw-r--r--include/linux/hid.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 2deff79f39a1..121d5b8bc867 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;
};
@@ -600,9 +600,9 @@ struct hid_driver;
struct hid_ll_driver;
struct hid_device { /* device report descriptor */
- __u8 *dev_rdesc;
+ const __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 */
@@ -822,7 +822,7 @@ struct hid_driver {
struct hid_usage *usage, __s32 value);
void (*report)(struct hid_device *hdev, struct hid_report *report);
- __u8 *(*report_fixup)(struct hid_device *hdev, __u8 *buf,
+ const __u8 *(*report_fixup)(struct hid_device *hdev, __u8 *buf,
unsigned int *size);
int (*input_mapping)(struct hid_device *hdev,
@@ -955,7 +955,7 @@ struct hid_device *hid_allocate_device(void);
struct hid_report *hid_register_report(struct hid_device *device,
enum hid_report_type type, unsigned int id,
unsigned int application);
-int hid_parse_report(struct hid_device *hid, __u8 *start, unsigned size);
+int hid_parse_report(struct hid_device *hid, const __u8 *start, unsigned size);
struct hid_report *hid_validate_values(struct hid_device *hid,
enum hid_report_type type, unsigned int id,
unsigned int field_index,