summaryrefslogtreecommitdiffstats
path: root/drivers/clk/clk-rk808.c
diff options
context:
space:
mode:
authorMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com>2018-12-04 12:38:03 +0100
committerStephen Boyd <sboyd@kernel.org>2018-12-05 18:20:35 +0100
commit252246674f55acad58312cfa036e7e65068dfb31 (patch)
treea341d00e9f0ee2c0e39398e8957bbbb2aea97878 /drivers/clk/clk-rk808.c
parentclk: clk-hi655x: Free of_provider at remove (diff)
downloadlinux-252246674f55acad58312cfa036e7e65068dfb31.tar.xz
linux-252246674f55acad58312cfa036e7e65068dfb31.zip
clk: rk808: use managed version of of_provider registration
Simplify clean-up for rk808 by using managed version of of_provider registration. Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/clk-rk808.c')
-rw-r--r--drivers/clk/clk-rk808.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/clk/clk-rk808.c b/drivers/clk/clk-rk808.c
index 6461f2820a5b..8d90bdf5b946 100644
--- a/drivers/clk/clk-rk808.c
+++ b/drivers/clk/clk-rk808.c
@@ -138,23 +138,12 @@ static int rk808_clkout_probe(struct platform_device *pdev)
if (ret)
return ret;
- return of_clk_add_hw_provider(node, of_clk_rk808_get, rk808_clkout);
-}
-
-static int rk808_clkout_remove(struct platform_device *pdev)
-{
- struct rk808 *rk808 = dev_get_drvdata(pdev->dev.parent);
- struct i2c_client *client = rk808->i2c;
- struct device_node *node = client->dev.of_node;
-
- of_clk_del_provider(node);
-
- return 0;
+ return devm_of_clk_add_hw_provider(&pdev->dev, of_clk_rk808_get,
+ rk808_clkout);
}
static struct platform_driver rk808_clkout_driver = {
.probe = rk808_clkout_probe,
- .remove = rk808_clkout_remove,
.driver = {
.name = "rk808-clkout",
},