[PATCH bpf-next 8/9] HID: bpf: constify BPF ops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The BPF core now allows the registration of read-only ops tables,
make use of it.

Signed-off-by: Thomas Weißschuh <linux@xxxxxxxxxxxxxx>
---
 drivers/hid/bpf/hid_bpf_struct_ops.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/hid/bpf/hid_bpf_struct_ops.c b/drivers/hid/bpf/hid_bpf_struct_ops.c
index 0e611a9d79d753213abbdf81f7ac0557e50c2ede..2baefb351a01fcb351fd6da8ca72f42d27779df5 100644
--- a/drivers/hid/bpf/hid_bpf_struct_ops.c
+++ b/drivers/hid/bpf/hid_bpf_struct_ops.c
@@ -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,

-- 
2.47.1





[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux