Skip to content

Commit 9b0a383

Browse files
gregkhJiri Kosina
authored andcommitted
HID: bpf: make bus_type const in struct hid_bpf_ops
The struct bus_type pointer in hid_bpf_ops just passes the pointer to the driver core, and the driver core can handle, and expects, a constant pointer, so also make the pointer constant in hid_bpf_ops. Part of the process of moving all usages of struct bus_type to be constant to move them all to read-only memory. Cc: Jiri Kosina <[email protected]> Cc: Benjamin Tissoires <[email protected]> Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent c4a9743 commit 9b0a383

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/hid_bpf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ struct hid_bpf_ops {
115115
size_t len, enum hid_report_type rtype,
116116
enum hid_class_request reqtype);
117117
struct module *owner;
118-
struct bus_type *bus_type;
118+
const struct bus_type *bus_type;
119119
};
120120

121121
extern struct hid_bpf_ops *hid_bpf_ops;

0 commit comments

Comments
 (0)