aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Peter Clausen <[email protected]>2023-04-09 18:44:58 -0700
committerBjorn Andersson <[email protected]>2023-04-12 08:24:49 -0700
commitf1f67db9d64ffb85af04dbbf59e3f213fbf86add (patch)
tree116af469cd9bfd40b1924cc272a0b639932a152c
parentd75b82cff48883b5e75abfd3930afa7a148ab440 (diff)
clk: qcom: rpm: Use managed `of_clk_add_hw_provider()`
Use the managed `devm_of_clk_add_hw_provider()` instead of `of_clk_add_hw_provider()`. This makes sure the provider gets automatically removed on unbind and allows to completely eliminate the drivers `remove()` callback. Signed-off-by: Lars-Peter Clausen <[email protected]> Reviewed-by: Stephen Boyd <[email protected]> Signed-off-by: Bjorn Andersson <[email protected]> Link: https://lore.kernel.org/r/[email protected]
-rw-r--r--drivers/clk/qcom/clk-rpm.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/clk/qcom/clk-rpm.c b/drivers/clk/qcom/clk-rpm.c
index e723ddb99a44..cac623e27b0e 100644
--- a/drivers/clk/qcom/clk-rpm.c
+++ b/drivers/clk/qcom/clk-rpm.c
@@ -580,8 +580,8 @@ static int rpm_clk_probe(struct platform_device *pdev)
goto err;
}
- ret = of_clk_add_hw_provider(pdev->dev.of_node, qcom_rpm_clk_hw_get,
- rcc);
+ ret = devm_of_clk_add_hw_provider(&pdev->dev, qcom_rpm_clk_hw_get,
+ rcc);
if (ret)
goto err;
@@ -591,18 +591,12 @@ err:
return ret;
}
-static void rpm_clk_remove(struct platform_device *pdev)
-{
- of_clk_del_provider(pdev->dev.of_node);
-}
-
static struct platform_driver rpm_clk_driver = {
.driver = {
.name = "qcom-clk-rpm",
.of_match_table = rpm_clk_match_table,
},
.probe = rpm_clk_probe,
- .remove_new = rpm_clk_remove,
};
static int __init rpm_clk_init(void)