spi: tegra: use run time pm apis for clock control
Laxman Dewangan [Mon, 30 Jan 2012 11:28:45 +0000 (16:28 +0530)]
Used run time apis for clock controls i.e. clock enable/
disable in place of direct clock apis.
Using of runtime pm api was already implemented but it was
missed on probe where it was calling clock_disable.
Fixing this issue.

bug 928541

Change-Id: I511467bd1cbe05f2a05d219d19236426a30d05d5
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/78156
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Reviewed-by: Ashwini Ghuge <aghuge@nvidia.com>

drivers/spi/spi-tegra.c

index c6ec3d0..1e1ec83 100644 (file)
@@ -1352,7 +1352,7 @@ skip_dma_alloc:
        ret = spi_register_master(master);
        if (!tspi->is_clkon_always) {
                if (tspi->clk_state) {
-                       clk_disable(tspi->clk);
+                       pm_runtime_put_sync(&pdev->dev);
                        tspi->clk_state = 0;
                }
        }