Skip to content

Commit

Permalink
TTY: serial, define uart_port_activate/shutdown
Browse files Browse the repository at this point in the history
This is a preparation for the next patches which will move the stuff
from uart_open and uart_close/hangup here. Then we will use
tty_port_* helpers.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Jiri Slaby authored and Greg Kroah-Hartman committed Nov 15, 2011
1 parent 1c7b13c commit 0b1db83
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions drivers/tty/serial/serial_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1404,6 +1404,15 @@ static void uart_hangup(struct tty_struct *tty)
mutex_unlock(&port->mutex);
}

static int uart_port_activate(struct tty_port *port, struct tty_struct *tty)
{
return 0;
}

static void uart_port_shutdown(struct tty_port *port)
{
}

static int uart_carrier_raised(struct tty_port *port)
{
struct uart_state *state = container_of(port, struct uart_state, port);
Expand Down Expand Up @@ -2162,6 +2171,8 @@ static const struct tty_operations uart_ops = {
};

static const struct tty_port_operations uart_port_ops = {
.activate = uart_port_activate,
.shutdown = uart_port_shutdown,
.carrier_raised = uart_carrier_raised,
.dtr_rts = uart_dtr_rts,
};
Expand Down

0 comments on commit 0b1db83

Please sign in to comment.