Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 24fec750 authored by Jon Hunter's avatar Jon Hunter Committed by Vinod Koul
Browse files

dmaengine: tegra210-adma: Update driver to use of_pm_clk_add_clk



Commit 498b5fdd ("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: default avatarJon Hunter <jonathanh@nvidia.com>
Acked-by: default avatarLaxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 29b4817d
Loading
Loading
Loading
Loading
+2 −12
Original line number Original line Diff line number Diff line
@@ -670,7 +670,6 @@ static int tegra_adma_probe(struct platform_device *pdev)
	const struct tegra_adma_chip_data *cdata;
	const struct tegra_adma_chip_data *cdata;
	struct tegra_adma *tdma;
	struct tegra_adma *tdma;
	struct resource	*res;
	struct resource	*res;
	struct clk *clk;
	int ret, i;
	int ret, i;


	cdata = of_device_get_match_data(&pdev->dev);
	cdata = of_device_get_match_data(&pdev->dev);
@@ -697,18 +696,9 @@ static int tegra_adma_probe(struct platform_device *pdev)
	if (ret)
	if (ret)
		return ret;
		return ret;


	clk = clk_get(&pdev->dev, "d_audio");
	ret = of_pm_clk_add_clk(&pdev->dev, "d_audio");
	if (IS_ERR(clk)) {
	if (ret)
		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);
		goto clk_destroy;
		goto clk_destroy;
	}


	pm_runtime_enable(&pdev->dev);
	pm_runtime_enable(&pdev->dev);