Merge branch 'stable-3.2' into pandora-3.2
[pandora-kernel.git] / arch / arm / mach-omap2 / serial.c
index c61ba57..3b6756e 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/serial_8250.h>
 #include <linux/pm_runtime.h>
 #include <linux/console.h>
+#include <linux/module.h>
 
 #ifdef CONFIG_SERIAL_OMAP
 #include <plat/omap-serial.h>
@@ -375,6 +376,19 @@ static void omap_uart_allow_sleep(struct omap_uart_state *uart)
        del_timer(&uart->timer);
 }
 
+void omap_uart_block_sleep_id(int num)
+{
+       struct omap_uart_state *uart;
+
+       list_for_each_entry(uart, &uart_list, node) {
+               if (num == uart->num && uart->can_sleep) {
+                       omap_uart_block_sleep(uart);
+                       return;
+               }
+       }
+}
+EXPORT_SYMBOL(omap_uart_block_sleep_id);
+
 static void omap_uart_idle_timer(unsigned long data)
 {
        struct omap_uart_state *uart = (struct omap_uart_state *)data;