bpf_lirc.h 698 B

123456789101112131415161718192021222324252627282930
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _BPF_LIRC_H
  3. #define _BPF_LIRC_H
  4. #include <uapi/linux/bpf.h>
  5. #ifdef CONFIG_BPF_LIRC_MODE2
  6. int lirc_prog_attach(const union bpf_attr *attr, struct bpf_prog *prog);
  7. int lirc_prog_detach(const union bpf_attr *attr);
  8. int lirc_prog_query(const union bpf_attr *attr, union bpf_attr __user *uattr);
  9. #else
  10. static inline int lirc_prog_attach(const union bpf_attr *attr,
  11. struct bpf_prog *prog)
  12. {
  13. return -EINVAL;
  14. }
  15. static inline int lirc_prog_detach(const union bpf_attr *attr)
  16. {
  17. return -EINVAL;
  18. }
  19. static inline int lirc_prog_query(const union bpf_attr *attr,
  20. union bpf_attr __user *uattr)
  21. {
  22. return -EINVAL;
  23. }
  24. #endif
  25. #endif /* _BPF_LIRC_H */