]> git.baikalelectronics.ru Git - kernel.git/commit
serial: imx: disable console clocks on unregister
authorFrancesco Dolcini <francesco.dolcini@toradex.com>
Wed, 20 Oct 2021 19:26:43 +0000 (21:26 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Oct 2021 08:30:08 +0000 (10:30 +0200)
commit53a2f256472ca284a2ea437bba57cab622b6fadb
tree0fe9799146f1216deaf50240d51fce1b1017b928
parent4e36b3a21acf688d1aa5b9567ca873add9177155
serial: imx: disable console clocks on unregister

During console setup imx_uart_console_setup() enables clocks, but they
are never disabled when the console is unregistered, this leads to
clk_prepare_enable() being called multiple times without a matching
clk_disable_unprepare() in case of console unregister.

Ensure that clock enable/disable are balanced adding
clk_disable_unprepare() in the console exit callback.

Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Link: https://lore.kernel.org/r/20211020192643.476895-3-francesco.dolcini@toradex.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/imx.c