]> git.baikalelectronics.ru Git - kernel.git/commit
spi: imx: fix the unbalanced spi runtime pm management
authorClark Wang <xiaoning.wang@nxp.com>
Tue, 24 Nov 2020 08:52:47 +0000 (16:52 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 24 Nov 2020 14:14:02 +0000 (14:14 +0000)
commit44934a6e12cba9a3c405ce02b80928a92ebf36ed
tree6c4aacf25eb4e9895c2e5a27cfe50b4570e7abd4
parent0b96251b88ad5aebf2fcf10c2ba24fe1aa9bb3a0
spi: imx: fix the unbalanced spi runtime pm management

If set active without increase the usage count of pm, the dont use
autosuspend function will call the suspend callback to close the two
clocks of spi because the usage count is reduced to -1.
This will cause the warning dump below when the defer-probe occurs.

[  129.379701] ecspi2_root_clk already disabled
[  129.384005] WARNING: CPU: 1 PID: 33 at drivers/clk/clk.c:952 clk_core_disable+0xa4/0xb0

So add the get noresume function before set active.

Fixes: 8ecb630da2e3 spi: imx: fix runtime pm support for !CONFIG_PM
Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
Link: https://lore.kernel.org/r/20201124085247.18025-1-xiaoning.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-imx.c