]> git.baikalelectronics.ru Git - kernel.git/commit
tty: serial: 8250_mtk: always resume the device in probe.
authorPeter Shih <pihsun@chromium.org>
Tue, 27 Nov 2018 04:49:50 +0000 (12:49 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Dec 2018 10:31:21 +0000 (11:31 +0100)
commit3533ba7e7a07e9c06faf2617a22454140e9bd4fd
tree26f1993d0acaf1c4e4a504428524244e66534fd1
parent2820055b1fd39a5c12a3fd06c5ec645ca0e5ee7a
tty: serial: 8250_mtk: always resume the device in probe.

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 099afd1f86f4 ("tty: serial:
8250_mtk: use pm_runtime callbacks for enabling"), but still use
pm_runtime callbacks.

Fixes: 099afd1f86f4 ("tty: serial: 8250_mtk: use pm_runtime callbacks for enabling")
Signed-off-by: Peter Shih <pihsun@chromium.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_mtk.c