summaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2006-09-25 23:32:57 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-26 08:49:03 -0700
commite1da95ae38afdcda83328300c4aed755d9fc01a6 (patch)
treee4d0c54a44df19235b656eae92ab3da2404024ba /drivers/serial
parentc8eb8b4025175f967af0ba8e933f23aa9954dc35 (diff)
downloadlinux-e1da95ae38afdcda83328300c4aed755d9fc01a6.tar.bz2
[PATCH] suspend: make it possible to disable serial console suspend
Hack uart_suspend_port() and uart_resume_port() so that serial console ports are not suspended if CONFIG_DISABLE_CONSOLE_SUSPEND is set. This makes it possible to debug the suspend and resume routines of all device drivers as well as the lowest-level swsusp code with the help of the serial console. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/serial_core.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index 372e47f7d596..5f7ba1adb309 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -1929,6 +1929,13 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *port)
mutex_lock(&state->mutex);
+#ifdef CONFIG_DISABLE_CONSOLE_SUSPEND
+ if (uart_console(port)) {
+ mutex_unlock(&state->mutex);
+ return 0;
+ }
+#endif
+
if (state->info && state->info->flags & UIF_INITIALIZED) {
const struct uart_ops *ops = port->ops;
@@ -1967,6 +1974,13 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *port)
mutex_lock(&state->mutex);
+#ifdef CONFIG_DISABLE_CONSOLE_SUSPEND
+ if (uart_console(port)) {
+ mutex_unlock(&state->mutex);
+ return 0;
+ }
+#endif
+
uart_change_pm(state, 0);
/*