mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
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 <[email protected]> Signed-off-by: Michal Simek <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
86df8dd147
commit
82b1b2ec5d
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue