blob: 9d9ff755ec2972cf6e46d1905e1a5caae9dd5ae6 [file] [log] [blame]
Sean Youngf4364dc2018-05-27 12:24:09 +01001/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _BPF_LIRC_H
3#define _BPF_LIRC_H
4
5#include <uapi/linux/bpf.h>
6
7#ifdef CONFIG_BPF_LIRC_MODE2
Sean Youngfdb5c452018-06-19 00:04:24 +01008int lirc_prog_attach(const union bpf_attr *attr, struct bpf_prog *prog);
Sean Youngf4364dc2018-05-27 12:24:09 +01009int lirc_prog_detach(const union bpf_attr *attr);
10int lirc_prog_query(const union bpf_attr *attr, union bpf_attr __user *uattr);
11#else
Sean Youngfdb5c452018-06-19 00:04:24 +010012static inline int lirc_prog_attach(const union bpf_attr *attr,
13 struct bpf_prog *prog)
Sean Youngf4364dc2018-05-27 12:24:09 +010014{
15 return -EINVAL;
16}
17
18static inline int lirc_prog_detach(const union bpf_attr *attr)
19{
20 return -EINVAL;
21}
22
23static inline int lirc_prog_query(const union bpf_attr *attr,
24 union bpf_attr __user *uattr)
25{
26 return -EINVAL;
27}
28#endif
29
30#endif /* _BPF_LIRC_H */