[PATCH 5/7] UART: OMAP: Prevent cutting of clocks if put_sync immediately follows

Shubhrajyoti D shubhrajyoti at ti.com
Mon Apr 16 11:06:59 EDT 2012


In serial_omap_stop_tx in the dma case. We do a autosuspend and
immediately a put_sync. Prevent the call of auto suspend. The else
case is left as is.

Cc: Govindraj.R <govindraj.raja at ti.com>
Signed-off-by: Shubhrajyoti D <shubhrajyoti at ti.com>
---
 drivers/tty/serial/omap-serial.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
index 7c69b21..1593986 100644
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
@@ -149,11 +149,10 @@ static void serial_omap_stop_tx(struct uart_port *port)
 		omap_stop_dma(up->uart_dma.tx_dma_channel);
 		omap_free_dma(up->uart_dma.tx_dma_channel);
 		up->uart_dma.tx_dma_channel = OMAP_UART_DMA_CH_FREE;
-		pm_runtime_mark_last_busy(&up->pdev->dev);
-		pm_runtime_put_autosuspend(&up->pdev->dev);
+	} else {
+		pm_runtime_get_sync(&up->pdev->dev);
 	}
 
-	pm_runtime_get_sync(&up->pdev->dev);
 	if (up->ier & UART_IER_THRI) {
 		up->ier &= ~UART_IER_THRI;
 		serial_out(up, UART_IER, up->ier);
-- 
1.7.4.1




More information about the linux-arm-kernel mailing list