Skip to content

Commit

Permalink
tty: We want the port object to be persistent
Browse files Browse the repository at this point in the history
Move the tty_port and uart_info bits around a little. By embedding the uart_info
into the uart_port we get rid of lots of corner case testing and also get the
ability to go port<->state<->info which is a bit more elegant than the current
data structures.

Downsides - we allocate a tiny bit more memory for unused ports, upside we've
removed as much code as it saved for most users..

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Jan 2, 2009
1 parent 6ef5306 commit f751928
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 112 deletions.
2 changes: 1 addition & 1 deletion drivers/serial/jsm/jsm_tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ static void jsm_tty_close(struct uart_port *port)
jsm_printk(CLOSE, INFO, &channel->ch_bd->pci_dev, "start\n");

bd = channel->ch_bd;
ts = channel->uart_port.info->port.tty->termios;
ts = port->info->port.tty->termios;

channel->ch_flags &= ~(CH_STOPI);

Expand Down
Loading

0 comments on commit f751928

Please sign in to comment.