diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-11-03 07:10:07 +0100 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-11-03 07:10:07 +0100 |
commit | 7a53c7f56bbfc9b0ef892e68f5cfae3d902544d1 (patch) | |
tree | 19dec256fc80ad06d631ece78b9eb68a457ce66b /drivers/serial/uartlite.c | |
parent | Input: atkbd - add a quirk for OQO 01+ multimedia keys (diff) | |
parent | Linux 2.6.32-rc5 (diff) | |
download | linux-7a53c7f56bbfc9b0ef892e68f5cfae3d902544d1.tar.xz linux-7a53c7f56bbfc9b0ef892e68f5cfae3d902544d1.zip |
Merge commit 'v2.6.32-rc5' into for-linus
Diffstat (limited to 'drivers/serial/uartlite.c')
-rw-r--r-- | drivers/serial/uartlite.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/serial/uartlite.c b/drivers/serial/uartlite.c index 3317148a4b93..377f2712289e 100644 --- a/drivers/serial/uartlite.c +++ b/drivers/serial/uartlite.c @@ -75,7 +75,7 @@ static struct uart_port ulite_ports[ULITE_NR_UARTS]; static int ulite_receive(struct uart_port *port, int stat) { - struct tty_struct *tty = port->info->port.tty; + struct tty_struct *tty = port->state->port.tty; unsigned char ch = 0; char flag = TTY_NORMAL; @@ -125,7 +125,7 @@ static int ulite_receive(struct uart_port *port, int stat) static int ulite_transmit(struct uart_port *port, int stat) { - struct circ_buf *xmit = &port->info->xmit; + struct circ_buf *xmit = &port->state->xmit; if (stat & ULITE_STATUS_TXFULL) return 0; @@ -154,17 +154,22 @@ static int ulite_transmit(struct uart_port *port, int stat) static irqreturn_t ulite_isr(int irq, void *dev_id) { struct uart_port *port = dev_id; - int busy; + int busy, n = 0; do { int stat = readb(port->membase + ULITE_STATUS); busy = ulite_receive(port, stat); busy |= ulite_transmit(port, stat); + n++; } while (busy); - tty_flip_buffer_push(port->info->port.tty); - - return IRQ_HANDLED; + /* work done? */ + if (n > 1) { + tty_flip_buffer_push(port->state->port.tty); + return IRQ_HANDLED; + } else { + return IRQ_NONE; + } } static unsigned int ulite_tx_empty(struct uart_port *port) @@ -221,7 +226,7 @@ static int ulite_startup(struct uart_port *port) int ret; ret = request_irq(port->irq, ulite_isr, - IRQF_DISABLED | IRQF_SAMPLE_RANDOM, "uartlite", port); + IRQF_SHARED | IRQF_SAMPLE_RANDOM, "uartlite", port); if (ret) return ret; |