]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
dmaengine: tegra210-adma: Update driver to use of_pm_clk_add_clk
authorJon Hunter <jonathanh@nvidia.com>
Thu, 11 Aug 2016 10:42:20 +0000 (11:42 +0100)
committerVinod Koul <vinod.koul@intel.com>
Mon, 22 Aug 2016 06:25:05 +0000 (11:55 +0530)
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>
drivers/dma/tegra210-adma.c

index c4b121c4559de06cb633ad9883d82455137a85f1..b10cbaa82ff537b1cfb68d93d80aecdfebcd6c22 100644 (file)
@@ -670,7 +670,6 @@ static int tegra_adma_probe(struct platform_device *pdev)
        const struct tegra_adma_chip_data *cdata;
        struct tegra_adma *tdma;
        struct resource *res;
-       struct clk *clk;
        int ret, i;
 
        cdata = of_device_get_match_data(&pdev->dev);
@@ -697,18 +696,9 @@ static int tegra_adma_probe(struct platform_device *pdev)
        if (ret)
                return ret;
 
-       clk = clk_get(&pdev->dev, "d_audio");
-       if (IS_ERR(clk)) {
-               dev_err(&pdev->dev, "ADMA clock not found\n");
-               ret = PTR_ERR(clk);
-               goto clk_destroy;
-       }
-
-       ret = pm_clk_add_clk(&pdev->dev, clk);
-       if (ret) {
-               clk_put(clk);
+       ret = of_pm_clk_add_clk(&pdev->dev, "d_audio");
+       if (ret)
                goto clk_destroy;
-       }
 
        pm_runtime_enable(&pdev->dev);