diff options
-rw-r--r-- | drivers/serial/serial_core.c | 14 |
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) | |||
1929 | 1929 | ||
1930 | mutex_lock(&state->mutex); | 1930 | mutex_lock(&state->mutex); |
1931 | 1931 | ||
1932 | #ifdef CONFIG_DISABLE_CONSOLE_SUSPEND | ||
1933 | if (uart_console(port)) { | ||
1934 | mutex_unlock(&state->mutex); | ||
1935 | return 0; | ||
1936 | } | ||
1937 | #endif | ||
1938 | |||
1932 | if (state->info && state->info->flags & UIF_INITIALIZED) { | 1939 | if (state->info && state->info->flags & UIF_INITIALIZED) { |
1933 | const struct uart_ops *ops = port->ops; | 1940 | const struct uart_ops *ops = port->ops; |
1934 | 1941 | ||
@@ -1967,6 +1974,13 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *port) | |||
1967 | 1974 | ||
1968 | mutex_lock(&state->mutex); | 1975 | mutex_lock(&state->mutex); |
1969 | 1976 | ||
1977 | #ifdef CONFIG_DISABLE_CONSOLE_SUSPEND | ||
1978 | if (uart_console(port)) { | ||
1979 | mutex_unlock(&state->mutex); | ||
1980 | return 0; | ||
1981 | } | ||
1982 | #endif | ||
1983 | |||
1970 | uart_change_pm(state, 0); | 1984 | uart_change_pm(state, 0); |
1971 | 1985 | ||
1972 | /* | 1986 | /* |