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)
committerColin Cross <ccross@android.com>
Thu, 30 Sep 2010 00:49:23 +0000 (17:49 -0700)
Signed-off-by: San Mehat <san@google.com>
drivers/serial/serial_core.c
include/linux/serial_core.h

index cd8511298bcb75e091b4ca582e5a6a425e9bb570..076cfd1546d40968f66087d44f4d3c241d32ea42 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 563e234009130ec557d1d6cb7d58b1875488d035..7b8a09e2ec7fdc95d8037f0f953c3f6782186f39 100644 (file)
@@ -234,6 +234,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