Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1290509
| From | Peter Hurley <peter@hurleysoftware.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/8] serial: core: Fold __uart_put_char() into caller |
| Date | 2015-12-13 01:40 +0100 |
| Message-ID | <qF2RI-14v-19@gated-at.bofh.it> (permalink) |
| References | <qF2RH-14v-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
uart_put_char() is the required interface; manually inline
__uart_put_char().
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
---
drivers/tty/serial/serial_core.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index cbf36df..321b45f 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -485,12 +485,15 @@ static void uart_change_speed(struct tty_struct *tty, struct uart_state *state,
spin_unlock_irq(&uport->lock);
}
-static inline int __uart_put_char(struct uart_port *port,
- struct circ_buf *circ, unsigned char c)
+static int uart_put_char(struct tty_struct *tty, unsigned char c)
{
+ struct uart_state *state = tty->driver_data;
+ struct uart_port *port = state->uart_port;
+ struct circ_buf *circ;
unsigned long flags;
int ret = 0;
+ circ = &state->xmit;
if (!circ->buf)
return 0;
@@ -504,13 +507,6 @@ static inline int __uart_put_char(struct uart_port *port,
return ret;
}
-static int uart_put_char(struct tty_struct *tty, unsigned char ch)
-{
- struct uart_state *state = tty->driver_data;
-
- return __uart_put_char(state->uart_port, &state->xmit, ch);
-}
-
static void uart_flush_chars(struct tty_struct *tty)
{
uart_start(tty);
--
2.6.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/8] Fix unsafe uart port access Peter Hurley <peter@hurleysoftware.com> - 2015-12-13 01:40 +0100 [PATCH 4/8] serial: core: Take port mutex for send_xchar() tty method Peter Hurley <peter@hurleysoftware.com> - 2015-12-13 01:40 +0100 [PATCH 3/8] serial: core: Use tty->index for port # in debug messages Peter Hurley <peter@hurleysoftware.com> - 2015-12-13 01:40 +0100 [PATCH 1/8] serial: core: Fold __uart_put_char() into caller Peter Hurley <peter@hurleysoftware.com> - 2015-12-13 01:40 +0100 [PATCH 5/8] serial: core: Expand port mutex section in uart_poll_init() Peter Hurley <peter@hurleysoftware.com> - 2015-12-13 01:40 +0100 [PATCH 6/8] serial: core: Prevent unsafe uart port access, part 1 Peter Hurley <peter@hurleysoftware.com> - 2015-12-13 01:40 +0100 [PATCH 2/8] serial: core: Fold do_uart_get_info() into caller Peter Hurley <peter@hurleysoftware.com> - 2015-12-13 01:40 +0100 [PATCH 7/8] serial: core: Prevent unsafe uart port access, part 2 Peter Hurley <peter@hurleysoftware.com> - 2015-12-13 01:40 +0100
csiph-web