serial_core: Add wake_peer uart operation which is called before starting UART TX...
authorSan Mehat <san@google.com>
Thu, 30 Jul 2009 03:21:28 +0000 (20:21 -0700)
committerArve Hjønnevåg <arve@android.com>
Mon, 8 Feb 2010 23:35:56 +0000 (15:35 -0800)
Signed-off-by: San Mehat <san@google.com>
drivers/serial/serial_core.c
include/linux/serial_core.h

index dcc72444e8e7015e904c70d726a83873dbeff21e..47ad0cb20e42cfc5c9dea490cc37e58684691ebe 100644 (file)
@@ -94,6 +94,9 @@ static void __uart_start(struct tty_struct *tty)
        struct uart_state *state = tty->driver_data;
        struct uart_port *port = state->uart_port;
 
+       if (port->ops->wake_peer)
+               port->ops->wake_peer(port);
+
        if (!uart_circ_empty(&state->xmit) && state->xmit.buf &&
            !tty->stopped && !tty->hw_stopped)
                port->ops->start_tx(port);
index db532ce288beec2f2a57bb9eb03912ede8f8afc9..743f48ac71dc937520fed470fe125a3e0e63cd51 100644 (file)
@@ -217,6 +217,7 @@ struct uart_ops {
        void            (*pm)(struct uart_port *, unsigned int state,
                              unsigned int oldstate);
        int             (*set_wake)(struct uart_port *, unsigned int state);
+       void            (*wake_peer)(struct uart_port *);
 
        /*
         * Return a string describing the type of the port