]> Git Repo - J-linux.git/commitdiff
HID: bpf: make bus_type const in struct hid_bpf_ops
authorGreg Kroah-Hartman <[email protected]>
Wed, 20 Dec 2023 07:38:48 +0000 (08:38 +0100)
committerJiri Kosina <[email protected]>
Tue, 2 Jan 2024 10:25:28 +0000 (11:25 +0100)
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]>
include/linux/hid_bpf.h

index e9afb61e6ee019edfcaa74eb78c01da5dcb75d5e..840cd254172d061ec445bdc845a7f1e8cbf20463 100644 (file)
@@ -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;
This page took 0.04928 seconds and 4 git commands to generate.