summaryrefslogtreecommitdiff
path: root/samples/hid/hid_mouse.bpf.c
diff options
context:
space:
mode:
authorBenjamin Tissoires <bentiss@kernel.org>2024-07-05 15:06:22 +0300
committerBenjamin Tissoires <bentiss@kernel.org>2024-07-05 15:08:31 +0300
commita67a1deb11d9a692366100d9ba9fb3aeb0c7707b (patch)
tree82843007949c176c5b629cb9d70203af49101031 /samples/hid/hid_mouse.bpf.c
parent3a904d2c771115154380caaae7ffaaf0095fb88f (diff)
downloadlinux-a67a1deb11d9a692366100d9ba9fb3aeb0c7707b.tar.xz
HID: samples: fix the 2 struct_ops definitions
Turns out that this is not compiling anymore because the hid_bpf_ops struct_ops definition had a change during the revisions. Fixes: e342d6f6f7d8 ("HID: samples: convert the 2 HID-BPF samples into struct_ops") Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Diffstat (limited to 'samples/hid/hid_mouse.bpf.c')
-rw-r--r--samples/hid/hid_mouse.bpf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/samples/hid/hid_mouse.bpf.c b/samples/hid/hid_mouse.bpf.c
index bd901fa855c9..f7f722dcf56d 100644
--- a/samples/hid/hid_mouse.bpf.c
+++ b/samples/hid/hid_mouse.bpf.c
@@ -67,7 +67,7 @@ static int hid_x_event(struct hid_bpf_ctx *hctx)
return 0;
}
-SEC("struct_ops/device_event")
+SEC("struct_ops/hid_device_event")
int BPF_PROG(hid_event, struct hid_bpf_ctx *hctx, enum hid_report_type type)
{
int ret = hid_y_event(hctx);
@@ -79,7 +79,7 @@ int BPF_PROG(hid_event, struct hid_bpf_ctx *hctx, enum hid_report_type type)
}
-SEC("struct_ops/rdesc_fixup")
+SEC("struct_ops/hid_rdesc_fixup")
int BPF_PROG(hid_rdesc_fixup, struct hid_bpf_ctx *hctx)
{
__u8 *data = hid_bpf_get_data(hctx, 0 /* offset */, 4096 /* size */);
@@ -121,8 +121,8 @@ int BPF_PROG(hid_rdesc_fixup, struct hid_bpf_ctx *hctx)
SEC(".struct_ops.link")
struct hid_bpf_ops mouse_invert = {
- .rdesc_fixup = (void *)hid_rdesc_fixup,
- .device_event = (void *)hid_event,
+ .hid_rdesc_fixup = (void *)hid_rdesc_fixup,
+ .hid_device_event = (void *)hid_event,
};
char _license[] SEC("license") = "GPL";