Skip to content

Commit

Permalink
serial: introduce tty krefs
Browse files Browse the repository at this point in the history
Initially just use the helper and thus krefs when we set and clear the
port values.

Signed-off-by: Alan Cox <alan@linux.intel.com>
  • Loading branch information
Alan Cox authored and Live-CD User committed Sep 19, 2009
1 parent 016af53 commit 7b01478
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/serial/serial_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1333,7 +1333,7 @@ static void uart_close(struct tty_struct *tty, struct file *filp)
tty_ldisc_flush(tty);

tty->closing = 0;
port->tty = NULL;
tty_port_tty_set(port, NULL);

if (port->blocked_open) {
if (port->close_delay)
Expand Down Expand Up @@ -1431,7 +1431,7 @@ static void uart_hangup(struct tty_struct *tty)
uart_shutdown(state);
port->count = 0;
clear_bit(ASYNCB_NORMAL_ACTIVE, &port->flags);
port->tty = NULL;
tty_port_tty_set(port, NULL);
wake_up_interruptible(&port->open_wait);
wake_up_interruptible(&port->delta_msr_wait);
}
Expand Down Expand Up @@ -1639,7 +1639,7 @@ static int uart_open(struct tty_struct *tty, struct file *filp)
state->uart_port->state = state;
tty->low_latency = (state->uart_port->flags & UPF_LOW_LATENCY) ? 1 : 0;
tty->alt_speed = 0;
port->tty = tty;
tty_port_tty_set(port, tty);

/*
* If the port is in the middle of closing, bail out now.
Expand Down

0 comments on commit 7b01478

Please sign in to comment.