diff options
Diffstat (limited to 'drivers/hid/bpf/hid_bpf_dispatch.h')
| -rw-r--r-- | drivers/hid/bpf/hid_bpf_dispatch.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/hid/bpf/hid_bpf_dispatch.h b/drivers/hid/bpf/hid_bpf_dispatch.h new file mode 100644 index 000000000000..44c6ea22233f --- /dev/null +++ b/drivers/hid/bpf/hid_bpf_dispatch.h @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef _BPF_HID_BPF_DISPATCH_H +#define _BPF_HID_BPF_DISPATCH_H + +#include <linux/hid.h> + +struct hid_bpf_ctx_kern { + struct hid_bpf_ctx ctx; + u8 *data; + bool from_bpf; +}; + +struct hid_device *hid_get_device(unsigned int hid_id); +void hid_put_device(struct hid_device *hid); +int hid_bpf_allocate_event_data(struct hid_device *hdev); +void __hid_bpf_ops_destroy_device(struct hid_device *hdev); +int hid_bpf_reconnect(struct hid_device *hdev); + +struct bpf_prog; + +#endif |
