Sean Young | f4364dc | 2018-05-27 12:24:09 +0100 | [diff] [blame] | 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 |
Sean Young | fdb5c45 | 2018-06-19 00:04:24 +0100 | [diff] [blame] | 8 | int lirc_prog_attach(const union bpf_attr *attr, struct bpf_prog *prog); |
Sean Young | f4364dc | 2018-05-27 12:24:09 +0100 | [diff] [blame] | 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 |
Sean Young | fdb5c45 | 2018-06-19 00:04:24 +0100 | [diff] [blame] | 12 | static inline int lirc_prog_attach(const union bpf_attr *attr, |
| 13 | struct bpf_prog *prog) |
Sean Young | f4364dc | 2018-05-27 12:24:09 +0100 | [diff] [blame] | 14 | { |
| 15 | return -EINVAL; |
| 16 | } |
| 17 | |
| 18 | static inline int lirc_prog_detach(const union bpf_attr *attr) |
| 19 | { |
| 20 | return -EINVAL; |
| 21 | } |
| 22 | |
| 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 */ |