]> git.karo-electronics.de Git - karo-tx-linux.git/commit
dmaengine: tegra-apb: Correct runtime-pm usage
authorJon Hunter <jonathanh@nvidia.com>
Fri, 13 Nov 2015 16:39:38 +0000 (16:39 +0000)
committerVinod Koul <vinod.koul@intel.com>
Sat, 5 Dec 2015 10:43:08 +0000 (16:13 +0530)
commitedd3bdbe9db1415f744bb5da0752675ddbd9eee0
tree58551c86b816e5ecb5555c6936c8930d6a1d4086
parent8005c49d9aea74d382f474ce11afbbc7d7130bec
dmaengine: tegra-apb: Correct runtime-pm usage

The tegra-apb DMA driver enables runtime-pm but never calls
pm_runtime_get/put and hence the runtime-pm callbacks are never invoked.
The driver manages the clocks by directly calling clk_prepare_enable()
and clk_unprepare_disable().

Fix this by replacing the clk_prepare_enable() and clk_disable_unprepare()
with pm_runtime_get_sync() and pm_runtime_put(), respectively. Note that
the consequence of this is that if runtime-pm is disabled, then the clocks
will remain on the entire time the driver is loaded. However, if
runtime-pm is disabled, then power is not most likely not a concern.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/tegra20-apb-dma.c