Eric Holmberg | 8ed30f2 | 2012-05-10 19:16:51 -0600 | [diff] [blame] | 1 | /* drivers/tty/smux_loopback.h |
| 2 | * |
Duy Truong | 790f06d | 2013-02-13 16:38:12 -0800 | [diff] [blame] | 3 | * Copyright (c) 2012, The Linux Foundation. All rights reserved. |
Eric Holmberg | 8ed30f2 | 2012-05-10 19:16:51 -0600 | [diff] [blame] | 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 | |
| 18 | #include "smux_private.h" |
| 19 | |
| 20 | #ifdef CONFIG_N_SMUX_LOOPBACK |
| 21 | |
| 22 | int smux_loopback_init(void); |
| 23 | int smux_tx_loopback(struct smux_pkt_t *pkt_ptr); |
| 24 | |
| 25 | #else |
| 26 | static inline int smux_loopback_init(void) |
| 27 | { |
| 28 | return 0; |
| 29 | } |
| 30 | |
| 31 | static inline int smux_tx_loopback(struct smux_pkt_t *pkt_ptr) |
| 32 | { |
| 33 | return -ENODEV; |
| 34 | } |
| 35 | |
| 36 | |
| 37 | #endif /* CONFIG_N_SMUX_LOOPBACK */ |
| 38 | #endif /* SMUX_LOOPBACK_H */ |
| 39 | |