aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorTushar Behera <tushar.behera@linaro.org>2011-12-06 05:45:54 -0500
committerVinod Koul <vinod.koul@linux.intel.com>2011-12-08 03:14:35 -0500
commit3506c0d507144d9b0f19efd5a56d289f70611179 (patch)
treea647255761f9f29eeef237f32dd09b46509db073 /drivers/dma
parentf910fb8fcd1c97788f2291c8646597bcd87ee061 (diff)
DMA: PL330: Remove pm_runtime_xxx calls from pl330 probe/remove
amba_probe() now calls pm_runtime_get_noresume() and pm_runtime_enable() for the devices before the device probe is called. Hence we don't need to call pm_runtime_get_xxx and pm_runtime_enable() in device probe again. In the same way, since amba_remove() calls the respective pm_runtime functions, those functions need not be called from device remove. This patch fixes following run time error with pl330 driver. dma-pl330 dma-pl330.0: Unbalanced pm_runtime_enable! dma-pl330 dma-pl330.0: failed to get runtime pm Signed-off-by: Giridhar Maruthy <giridhar.maruthy@linaro.org> Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/pl330.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index e0da795bdcb3..a5737575d236 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -820,17 +820,7 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id)
820 820
821 amba_set_drvdata(adev, pdmac); 821 amba_set_drvdata(adev, pdmac);
822 822
823#ifdef CONFIG_PM_RUNTIME 823#ifndef CONFIG_PM_RUNTIME
824 /* to use the runtime PM helper functions */
825 pm_runtime_enable(&adev->dev);
826
827 /* enable the power domain */
828 if (pm_runtime_get_sync(&adev->dev)) {
829 dev_err(&adev->dev, "failed to get runtime pm\n");
830 ret = -ENODEV;
831 goto probe_err1;
832 }
833#else
834 /* enable dma clk */ 824 /* enable dma clk */
835 clk_enable(pdmac->clk); 825 clk_enable(pdmac->clk);
836#endif 826#endif
@@ -971,10 +961,7 @@ static int __devexit pl330_remove(struct amba_device *adev)
971 res = &adev->res; 961 res = &adev->res;
972 release_mem_region(res->start, resource_size(res)); 962 release_mem_region(res->start, resource_size(res));
973 963
974#ifdef CONFIG_PM_RUNTIME 964#ifndef CONFIG_PM_RUNTIME
975 pm_runtime_put(&adev->dev);
976 pm_runtime_disable(&adev->dev);
977#else
978 clk_disable(pdmac->clk); 965 clk_disable(pdmac->clk);
979#endif 966#endif
980 967