From: Kevin Hilman Date: Mon, 27 Sep 2010 14:49:53 +0000 (+0530) Subject: OMAP: UART: don't do automatic bus-level suspend/resume X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3244fcd227526a2f21018a280c7af0a9219c6ff4;p=linux-beck.git OMAP: UART: don't do automatic bus-level suspend/resume Since the omap_device for UART is currently managed inside the idle path itself, don't let the bus-level code suspend/resume the UART. To prevent this, pm_runtime_get() is used when preparing for suspend and pm_runtime_put() is used when finished with suspend. Signed-off-by: Govindraj.R Signed-off-by: Kevin Hilman --- diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index 6ffbc924c4d4..ff83e91e6109 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c @@ -26,6 +26,7 @@ #include #include #include +#include #ifdef CONFIG_SERIAL_OMAP #include @@ -530,14 +531,17 @@ void omap_uart_enable_irqs(int enable) struct omap_uart_state *uart; list_for_each_entry(uart, &uart_list, node) { - if (enable) + if (enable) { + pm_runtime_put_sync(&uart->pdev->dev); ret = request_threaded_irq(uart->irq, NULL, omap_uart_interrupt, IRQF_SHARED, "serial idle", (void *)uart); - else + } else { + pm_runtime_get_noresume(&uart->pdev->dev); free_irq(uart->irq, (void *)uart); + } } }