aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/xilinx_uartps.c
diff options
context:
space:
mode:
authorShubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>2018-12-18 13:18:40 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-19 08:23:20 +0100
commit82b1b2ec5d4057af11395ac03209884369418a0d (patch)
treef5883625a3ef38bf5122c4a63c89964abe3916e5 /drivers/tty/serial/xilinx_uartps.c
parentserial: uartps: Add the device_init_wakeup (diff)
downloadlinux-dev-82b1b2ec5d4057af11395ac03209884369418a0d.tar.xz
linux-dev-82b1b2ec5d4057af11395ac03209884369418a0d.zip
serial: uartps: Check if the device is a console
While checking for console_suspend_enabled also check if the device is a console. Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/xilinx_uartps.c')
-rw-r--r--drivers/tty/serial/xilinx_uartps.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
index 0140644391df..9cdc36be5b13 100644
--- a/drivers/tty/serial/xilinx_uartps.c
+++ b/drivers/tty/serial/xilinx_uartps.c
@@ -1255,7 +1255,7 @@ static int cdns_uart_suspend(struct device *device)
may_wake = device_may_wakeup(device);
- if (console_suspend_enabled && may_wake) {
+ if (console_suspend_enabled && uart_console(port) && may_wake) {
unsigned long flags = 0;
spin_lock_irqsave(&port->lock, flags);
@@ -1293,7 +1293,7 @@ static int cdns_uart_resume(struct device *device)
may_wake = device_may_wakeup(device);
- if (console_suspend_enabled && !may_wake) {
+ if (console_suspend_enabled && uart_console(port) && !may_wake) {
clk_enable(cdns_uart->pclk);
clk_enable(cdns_uart->uartclk);