diff options
| author | Marius Strobl <marius@FreeBSD.org> | 2016-01-25 22:58:06 +0000 |
|---|---|---|
| committer | Marius Strobl <marius@FreeBSD.org> | 2016-01-25 22:58:06 +0000 |
| commit | 57169cea64fa5fc82057b63149d56395665dd490 (patch) | |
| tree | 20e508876d258a9d2b4c850f0d683e1a98359d0a /sys/dev/uart | |
| parent | fc2c2cd9e3f32daf40685ade050d5ab4e1e683e7 (diff) | |
Notes
Diffstat (limited to 'sys/dev/uart')
| -rw-r--r-- | sys/dev/uart/uart_tty.c | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/sys/dev/uart/uart_tty.c b/sys/dev/uart/uart_tty.c index 6b526aec4106..27ceb5b19343 100644 --- a/sys/dev/uart/uart_tty.c +++ b/sys/dev/uart/uart_tty.c @@ -57,6 +57,16 @@ static cn_putc_t uart_cnputc; static cn_grab_t uart_cngrab; static cn_ungrab_t uart_cnungrab; +static tsw_open_t uart_tty_open; +static tsw_close_t uart_tty_close; +static tsw_outwakeup_t uart_tty_outwakeup; +static tsw_inwakeup_t uart_tty_inwakeup; +static tsw_ioctl_t uart_tty_ioctl; +static tsw_param_t uart_tty_param; +static tsw_modem_t uart_tty_modem; +static tsw_free_t uart_tty_free; +static tsw_busy_t uart_tty_busy; + CONSOLE_DRIVER(uart); static struct uart_devinfo uart_console; @@ -157,7 +167,7 @@ uart_tty_close(struct tty *tp) struct uart_softc *sc; sc = tty_softc(tp); - if (sc == NULL || sc->sc_leaving || !sc->sc_opened) + if (sc == NULL || sc->sc_leaving || !sc->sc_opened) return; if (sc->sc_hwiflow) @@ -169,7 +179,6 @@ uart_tty_close(struct tty *tp) wakeup(sc); sc->sc_opened = 0; - return; } static void @@ -215,7 +224,8 @@ uart_tty_inwakeup(struct tty *tp) } static int -uart_tty_ioctl(struct tty *tp, u_long cmd, caddr_t data, struct thread *td) +uart_tty_ioctl(struct tty *tp, u_long cmd, caddr_t data, + struct thread *td __unused) { struct uart_softc *sc; @@ -256,8 +266,8 @@ uart_tty_param(struct tty *tp, struct termios *t) } stopbits = (t->c_cflag & CSTOPB) ? 2 : 1; if (t->c_cflag & PARENB) - parity = (t->c_cflag & PARODD) ? UART_PARITY_ODD - : UART_PARITY_EVEN; + parity = (t->c_cflag & PARODD) ? UART_PARITY_ODD : + UART_PARITY_EVEN; else parity = UART_PARITY_NONE; if (UART_PARAM(sc, t->c_ospeed, databits, stopbits, parity) != 0) @@ -285,7 +295,7 @@ uart_tty_modem(struct tty *tp, int biton, int bitoff) sc = tty_softc(tp); if (biton != 0 || bitoff != 0) - UART_SETSIG(sc, SER_DELTA(bitoff|biton) | biton); + UART_SETSIG(sc, SER_DELTA(bitoff | biton) | biton); return (sc->sc_hwsig); } @@ -344,7 +354,7 @@ uart_tty_intr(void *arg) } static void -uart_tty_free(void *arg) +uart_tty_free(void *arg __unused) { /* @@ -359,7 +369,7 @@ static bool uart_tty_busy(struct tty *tp) { struct uart_softc *sc; - + sc = tty_softc(tp); if (sc == NULL || sc->sc_leaving) return (FALSE); |
