@@ -289,14 +289,14 @@ static int __hid_bpf_hw_output_report(struct hid_bpf_ctx *ctx, u64 source)
return 0;
}
-static struct hid_bpf_ops __bpf_hid_bpf_ops = {
+static const struct hid_bpf_ops __bpf_hid_bpf_ops = {
.hid_device_event = __hid_bpf_device_event,
.hid_rdesc_fixup = __hid_bpf_rdesc_fixup,
.hid_hw_request = __hid_bpf_hw_request,
.hid_hw_output_report = __hid_bpf_hw_output_report,
};
-static struct bpf_struct_ops bpf_hid_bpf_ops = {
+static const struct bpf_struct_ops bpf_hid_bpf_ops = {
.verifier_ops = &hid_bpf_verifier_ops,
.init = hid_bpf_ops_init,
.check_member = hid_bpf_ops_check_member,
The BPF core now allows the registration of read-only ops tables, make use of it. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> --- drivers/hid/bpf/hid_bpf_struct_ops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)