aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Hunter <jonathanh@nvidia.com>2016-08-11 06:42:20 -0400
committerVinod Koul <vinod.koul@intel.com>2016-08-22 02:25:05 -0400
commit24fec75017ae2c9ecc5db71feb999f73d57ba04f (patch)
tree2e4492d132ccde18fb656d228377e97f429bbb96
parent29b4817d4018df78086157ea3a55c1d9424a7cfc (diff)
dmaengine: tegra210-adma: Update driver to use of_pm_clk_add_clk
Commit 498b5fdd40dd ("PM / clk: Add support for adding a specific clock from device-tree") add a new helper function for adding a clock from device-tree to a device. Update the ADMA driver to use this new function to simplify the driver. Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r--drivers/dma/tegra210-adma.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/dma/tegra210-adma.c b/drivers/dma/tegra210-adma.c
index c4b121c4559d..b10cbaa82ff5 100644
--- a/drivers/dma/tegra210-adma.c
+++ b/drivers/dma/tegra210-adma.c
@@ -670,7 +670,6 @@ static int tegra_adma_probe(struct platform_device *pdev)
670 const struct tegra_adma_chip_data *cdata; 670 const struct tegra_adma_chip_data *cdata;
671 struct tegra_adma *tdma; 671 struct tegra_adma *tdma;
672 struct resource *res; 672 struct resource *res;
673 struct clk *clk;
674 int ret, i; 673 int ret, i;
675 674
676 cdata = of_device_get_match_data(&pdev->dev); 675 cdata = of_device_get_match_data(&pdev->dev);
@@ -697,18 +696,9 @@ static int tegra_adma_probe(struct platform_device *pdev)
697 if (ret) 696 if (ret)
698 return ret; 697 return ret;
699 698
700 clk = clk_get(&pdev->dev, "d_audio"); 699 ret = of_pm_clk_add_clk(&pdev->dev, "d_audio");
701 if (IS_ERR(clk)) { 700 if (ret)
702 dev_err(&pdev->dev, "ADMA clock not found\n");
703 ret = PTR_ERR(clk);
704 goto clk_destroy;
705 }
706
707 ret = pm_clk_add_clk(&pdev->dev, clk);
708 if (ret) {
709 clk_put(clk);
710 goto clk_destroy; 701 goto clk_destroy;
711 }
712 702
713 pm_runtime_enable(&pdev->dev); 703 pm_runtime_enable(&pdev->dev);
714 704