Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _BPF_LIRC_H
0003 #define _BPF_LIRC_H
0004 
0005 #include <uapi/linux/bpf.h>
0006 
0007 #ifdef CONFIG_BPF_LIRC_MODE2
0008 int lirc_prog_attach(const union bpf_attr *attr, struct bpf_prog *prog);
0009 int lirc_prog_detach(const union bpf_attr *attr);
0010 int lirc_prog_query(const union bpf_attr *attr, union bpf_attr __user *uattr);
0011 #else
0012 static inline int lirc_prog_attach(const union bpf_attr *attr,
0013                    struct bpf_prog *prog)
0014 {
0015     return -EINVAL;
0016 }
0017 
0018 static inline int lirc_prog_detach(const union bpf_attr *attr)
0019 {
0020     return -EINVAL;
0021 }
0022 
0023 static inline int lirc_prog_query(const union bpf_attr *attr,
0024                   union bpf_attr __user *uattr)
0025 {
0026     return -EINVAL;
0027 }
0028 #endif
0029 
0030 #endif /* _BPF_LIRC_H */