summaryrefslogtreecommitdiff
path: root/drivers/serial/core.c
diff options
context:
space:
mode:
authorAlexander Viro <viro@www.linux.org.uk>2003-04-23 04:18:59 -0700
committerChristoph Hellwig <hch@lst.de>2003-04-23 04:18:59 -0700
commit345127472f366d63f50fdf29b9dd84e70a084bd7 (patch)
treee1f47d76d696923a8c1d8baa05e75f97748fda56 /drivers/serial/core.c
parent07462df3687e6a58846911460f4f4833fbe3d587 (diff)
[PATCH] tty cleanups (6/12)
tty->tty_index added; we initialize it with minor(tty->device) - tty->driver->minor_start. Majority of remaining tty->device uses had that form and are switched to use of tty->index.
Diffstat (limited to 'drivers/serial/core.c')
-rw-r--r--drivers/serial/core.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/serial/core.c b/drivers/serial/core.c
index f38106f0e9f8..814ed0c7b0c4 100644
--- a/drivers/serial/core.c
+++ b/drivers/serial/core.c
@@ -577,8 +577,7 @@ static void uart_flush_buffer(struct tty_struct *tty)
struct uart_port *port = state->port;
unsigned long flags;
- DPRINTK("uart_flush_buffer(%d) called\n",
- minor(tty->device) - tty->driver->minor_start);
+ DPRINTK("uart_flush_buffer(%d) called\n", tty->index);
spin_lock_irqsave(&port->lock, flags);
uart_circ_clear(&state->info->xmit);
@@ -1556,7 +1555,7 @@ static int uart_open(struct tty_struct *tty, struct file *filp)
{
struct uart_driver *drv = (struct uart_driver *)tty->driver->driver_state;
struct uart_state *state;
- int retval, line = minor(tty->device) - tty->driver->minor_start;
+ int retval, line = tty->index;
BUG_ON(!kernel_locked());
DPRINTK("uart_open(%d) called\n", line);