smux_loopback.h 970 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* drivers/tty/smux_loopback.h
  2. *
  3. * Copyright (c) 2012, The Linux Foundation. All rights reserved.
  4. *
  5. * This software is licensed under the terms of the GNU General Public
  6. * License version 2, as published by the Free Software Foundation, and
  7. * may be copied, distributed, and modified under those terms.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. */
  15. #ifndef SMUX_LOOPBACK_H
  16. #define SMUX_LOOPBACK_H
  17. #include "smux_private.h"
  18. #ifdef CONFIG_N_SMUX_LOOPBACK
  19. int smux_loopback_init(void);
  20. int smux_tx_loopback(struct smux_pkt_t *pkt_ptr);
  21. #else
  22. static inline int smux_loopback_init(void)
  23. {
  24. return 0;
  25. }
  26. static inline int smux_tx_loopback(struct smux_pkt_t *pkt_ptr)
  27. {
  28. return -ENODEV;
  29. }
  30. #endif /* CONFIG_N_SMUX_LOOPBACK */
  31. #endif /* SMUX_LOOPBACK_H */