Commit 7265c3cb authored by Matti Vaittinen's avatar Matti Vaittinen Committed by Stephen Boyd

clk: apcs-msm8916: simplify probe cleanup by using devm

use devm variant for of_provider registration.
Signed-off-by: default avatarMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
[sboyd@kernel.org: Drop unused parent pointer]
Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 654dea6e
...@@ -96,8 +96,8 @@ static int qcom_apcs_msm8916_clk_probe(struct platform_device *pdev) ...@@ -96,8 +96,8 @@ static int qcom_apcs_msm8916_clk_probe(struct platform_device *pdev)
goto err; goto err;
} }
ret = of_clk_add_hw_provider(parent->of_node, of_clk_hw_simple_get, ret = devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get,
&a53cc->clkr.hw); &a53cc->clkr.hw);
if (ret) { if (ret) {
dev_err(dev, "failed to add clock provider: %d\n", ret); dev_err(dev, "failed to add clock provider: %d\n", ret);
goto err; goto err;
...@@ -115,10 +115,8 @@ static int qcom_apcs_msm8916_clk_probe(struct platform_device *pdev) ...@@ -115,10 +115,8 @@ static int qcom_apcs_msm8916_clk_probe(struct platform_device *pdev)
static int qcom_apcs_msm8916_clk_remove(struct platform_device *pdev) static int qcom_apcs_msm8916_clk_remove(struct platform_device *pdev)
{ {
struct clk_regmap_mux_div *a53cc = platform_get_drvdata(pdev); struct clk_regmap_mux_div *a53cc = platform_get_drvdata(pdev);
struct device *parent = pdev->dev.parent;
clk_notifier_unregister(a53cc->pclk, &a53cc->clk_nb); clk_notifier_unregister(a53cc->pclk, &a53cc->clk_nb);
of_clk_del_provider(parent->of_node);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment