diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2023-04-10 04:44:57 +0300 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2023-04-10 22:45:13 +0300 |
commit | 56fc9a343a2001bf64a7370b3e3cf2256c60af3e (patch) | |
tree | d8c87cf64c169646f598bde7273a3a975a7db5f5 /drivers/clk/clk-lmk04832.c | |
parent | 56d144d0344aaa3810e2d18229f315480fc72a89 (diff) | |
download | linux-56fc9a343a2001bf64a7370b3e3cf2256c60af3e.tar.xz |
clk: lmk04832: 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.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Link: https://lore.kernel.org/r/20230410014502.27929-6-lars@metafoo.de
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/clk-lmk04832.c')
-rw-r--r-- | drivers/clk/clk-lmk04832.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/clk/clk-lmk04832.c b/drivers/clk/clk-lmk04832.c index 57485356de4c..afdfee3b365f 100644 --- a/drivers/clk/clk-lmk04832.c +++ b/drivers/clk/clk-lmk04832.c @@ -1522,8 +1522,8 @@ static int lmk04832_probe(struct spi_device *spi) } lmk->clk_data->num = info->num_channels; - ret = of_clk_add_hw_provider(lmk->dev->of_node, of_clk_hw_onecell_get, - lmk->clk_data); + ret = devm_of_clk_add_hw_provider(lmk->dev, of_clk_hw_onecell_get, + lmk->clk_data); if (ret) { dev_err(lmk->dev, "failed to add provider (%d)\n", ret); goto err_disable_vco; @@ -1547,7 +1547,6 @@ static void lmk04832_remove(struct spi_device *spi) struct lmk04832 *lmk = spi_get_drvdata(spi); clk_disable_unprepare(lmk->oscin); - of_clk_del_provider(spi->dev.of_node); } static const struct spi_device_id lmk04832_id[] = { |