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>
This commit is contained in:
parent
1efadbf2fd
commit
252246674f
|
@ -138,23 +138,12 @@ static int rk808_clkout_probe(struct platform_device *pdev)
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
return of_clk_add_hw_provider(node, of_clk_rk808_get, rk808_clkout);
|
return devm_of_clk_add_hw_provider(&pdev->dev, 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct platform_driver rk808_clkout_driver = {
|
static struct platform_driver rk808_clkout_driver = {
|
||||||
.probe = rk808_clkout_probe,
|
.probe = rk808_clkout_probe,
|
||||||
.remove = rk808_clkout_remove,
|
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "rk808-clkout",
|
.name = "rk808-clkout",
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue