mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 02:01:36 +03:00
ASoC: tegra-alt: remove devm_clk_put() APIs
Clock resource is associated with a device and when the device is unbound, the resource is freed. Drivers get the clock handle by using devm_clk_get(). No need for an explicit devm_clk_put() to release the clock, this is handled automatically when the device lifetime ends. Bug 200346429 Change-Id: I0885723e3a9a3fb41e54524ddacc3415f571576c Signed-off-by: Sameer Pujar <spujar@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1574311 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com> Reviewed-by: Mohan Kumar D <mkumard@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Dipesh Gandhi <dipeshg@nvidia.com> Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
This commit is contained in:
@@ -479,13 +479,13 @@ static int tegra186_dspk_platform_probe(struct platform_device *pdev)
|
||||
if (IS_ERR_OR_NULL(dspk->clk_pll_a_out0)) {
|
||||
dev_err(&pdev->dev, "Can't retrieve pll_a_out0 clock\n");
|
||||
ret = -ENOENT;
|
||||
goto err_clk_put;
|
||||
goto err;
|
||||
}
|
||||
|
||||
ret = clk_set_parent(dspk->clk_dspk, dspk->clk_pll_a_out0);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "Can't set parent of dspk clock\n");
|
||||
goto err_plla_clk_put;
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -592,10 +592,6 @@ err_suspend:
|
||||
tegra186_dspk_runtime_suspend(&pdev->dev);
|
||||
err_pm_disable:
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
err_plla_clk_put:
|
||||
devm_clk_put(&pdev->dev, dspk->clk_pll_a_out0);
|
||||
err_clk_put:
|
||||
devm_clk_put(&pdev->dev, dspk->clk_dspk);
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
@@ -618,9 +614,6 @@ static int tegra186_dspk_platform_remove(struct platform_device *pdev)
|
||||
if (!pm_runtime_status_suspended(&pdev->dev))
|
||||
tegra186_dspk_runtime_suspend(&pdev->dev);
|
||||
|
||||
devm_clk_put(&pdev->dev, dspk->clk_pll_a_out0);
|
||||
devm_clk_put(&pdev->dev, dspk->clk_dspk);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user