Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jon Hunter and committed by
Vinod Koul
24fec750 29b4817d

+2 -12
+2 -12
drivers/dma/tegra210-adma.c
··· 670 670 const struct tegra_adma_chip_data *cdata; 671 671 struct tegra_adma *tdma; 672 672 struct resource *res; 673 - struct clk *clk; 674 673 int ret, i; 675 674 676 675 cdata = of_device_get_match_data(&pdev->dev); ··· 696 697 if (ret) 697 698 return ret; 698 699 699 - clk = clk_get(&pdev->dev, "d_audio"); 700 - if (IS_ERR(clk)) { 701 - dev_err(&pdev->dev, "ADMA clock not found\n"); 702 - ret = PTR_ERR(clk); 700 + ret = of_pm_clk_add_clk(&pdev->dev, "d_audio"); 701 + if (ret) 703 702 goto clk_destroy; 704 - } 705 - 706 - ret = pm_clk_add_clk(&pdev->dev, clk); 707 - if (ret) { 708 - clk_put(clk); 709 - goto clk_destroy; 710 - } 711 703 712 704 pm_runtime_enable(&pdev->dev); 713 705