mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
serial: qcom-geni: Fix unbalanced runtime PM resume for no_console_suspend
When no_console_suspend is set for the serial console, the system
suspend callback skips pm_runtime_force_suspend() to keep the console
active. The resume callback still unconditionally calls
pm_runtime_force_resume(), which triggers an "Unbalanced
pm_runtime_enable!" warning.
Only force resume when the suspend callback force suspended the device.
Fixes: d0cd9c8d0f ("serial: qcom-geni: add force suspend/resume to system sleep callbacks")
Signed-off-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Reviewed-by: Praveen Talari <praveen.talari@oss.qualcomm.com>
Tested-by: David Heidelberg <david@ixit.cz> # OnePlus 6T (sdm845)
Link: https://patch.msgid.link/20260828-serial-qcom-geni-fix-unbalanced-rpm-resume-v1-1-af3e5aef17a6@oss.qualcomm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
a8e8cf9bf4
commit
3098c989bd
|
|
@ -2100,9 +2100,11 @@ static int qcom_geni_serial_resume(struct device *dev)
|
|||
struct uart_port *uport = &port->uport;
|
||||
struct qcom_geni_private_data *private_data = uport->private_data;
|
||||
|
||||
ret = pm_runtime_force_resume(dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
if (console_suspend_enabled || !uart_console(uport)) {
|
||||
ret = pm_runtime_force_resume(dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = uart_resume_port(private_data->drv, uport);
|
||||
if (uart_console(uport)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user