Commit 32445bd5 authored by Peter Shih's avatar Peter Shih Committed by Greg Kroah-Hartman

tty: serial: 8250_mtk: always resume the device in probe.

commit 100bc3e2bebf95506da57cbdf5f26b25f6da4c81 upstream.

serial8250_register_8250_port calls uart_config_port, which calls
config_port on the port before it tries to power on the port. So we need
the port to be on before calling serial8250_register_8250_port. Change
the code to always do a runtime resume in probe before registering port,
and always do a runtime suspend in remove.

This basically reverts the change in commit 68e5fc4a ("tty: serial:
8250_mtk: use pm_runtime callbacks for enabling"), but still use
pm_runtime callbacks.

Fixes: 68e5fc4a ("tty: serial: 8250_mtk: use pm_runtime callbacks for enabling")
Signed-off-by: default avatarPeter Shih <>
Cc: stable <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent 902d410d
......@@ -225,17 +225,17 @@ static int mtk8250_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, data);
if (!pm_runtime_enabled(&pdev->dev)) {
err = mtk8250_runtime_resume(&pdev->dev);
if (err)
return err;
err = mtk8250_runtime_resume(&pdev->dev);
if (err)
return err;
data->line = serial8250_register_8250_port(&uart);
if (data->line < 0)
return data->line;
return 0;
......@@ -246,13 +246,11 @@ static int mtk8250_remove(struct platform_device *pdev)
if (!pm_runtime_status_suspended(&pdev->dev))
return 0;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment