diff options
author | Heikki Krogerus <heikki.krogerus@linux.intel.com> | 2013-01-16 14:08:14 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-16 07:36:10 -0800 |
commit | a3b0397fdf19b3c23f37012532482c787e01d4a0 (patch) | |
tree | a00e2aeabf9b1922300ec39136215691b2d4a73e /drivers/tty/serial/8250 | |
parent | 6f3fe3b1027bf50c0a0859e5c9ee93b174b95543 (diff) | |
download | kernel_goldelico_gta04-a3b0397fdf19b3c23f37012532482c787e01d4a0.zip kernel_goldelico_gta04-a3b0397fdf19b3c23f37012532482c787e01d4a0.tar.gz kernel_goldelico_gta04-a3b0397fdf19b3c23f37012532482c787e01d4a0.tar.bz2 |
serial: 8250_dma: TX optimisation
Remove one useless wakeup, and do not use DMA with zero byte
transfers.
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/8250')
-rw-r--r-- | drivers/tty/serial/8250/8250_dma.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/tty/serial/8250/8250_dma.c b/drivers/tty/serial/8250/8250_dma.c index 02333fc..b9f7fd2 100644 --- a/drivers/tty/serial/8250/8250_dma.c +++ b/drivers/tty/serial/8250/8250_dma.c @@ -67,12 +67,12 @@ int serial8250_tx_dma(struct uart_8250_port *p) struct circ_buf *xmit = &p->port.state->xmit; struct dma_async_tx_descriptor *desc; - if (dma->tx_running) { - uart_write_wakeup(&p->port); + if (dma->tx_running) return -EBUSY; - } dma->tx_size = CIRC_CNT_TO_END(xmit->head, xmit->tail, UART_XMIT_SIZE); + if (!dma->tx_size) + return -EINVAL; desc = dmaengine_prep_slave_single(dma->txchan, dma->tx_addr + xmit->tail, |