xref: /openbmc/linux/include/linux/bpf_lirc.h (revision fdb5c453)
1 /* 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
8 int lirc_prog_attach(const union bpf_attr *attr, struct bpf_prog *prog);
9 int lirc_prog_detach(const union bpf_attr *attr);
10 int lirc_prog_query(const union bpf_attr *attr, union bpf_attr __user *uattr);
11 #else
lirc_prog_attach(const union bpf_attr * attr,struct bpf_prog * prog)12 static inline int lirc_prog_attach(const union bpf_attr *attr,
13 				   struct bpf_prog *prog)
14 {
15 	return -EINVAL;
16 }
17 
lirc_prog_detach(const union bpf_attr * attr)18 static inline int lirc_prog_detach(const union bpf_attr *attr)
19 {
20 	return -EINVAL;
21 }
22 
lirc_prog_query(const union bpf_attr * attr,union bpf_attr __user * uattr)23 static 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 */
31