Skip to content

Commit

Permalink
HID: bpf: make bus_type const in struct hid_bpf_ops
Browse files Browse the repository at this point in the history
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 <jikos@kernel.org>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: linux-input@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
  • Loading branch information
Greg Kroah-Hartman authored and Jiri Kosina committed Jan 2, 2024
1 parent c4a9743 commit 9b0a383
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/hid_bpf.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ struct hid_bpf_ops {
size_t len, enum hid_report_type rtype,
enum hid_class_request reqtype);
struct module *owner;
struct bus_type *bus_type;
const struct bus_type *bus_type;
};

extern struct hid_bpf_ops *hid_bpf_ops;
Expand Down

0 comments on commit 9b0a383

Please sign in to comment.