summaryrefslogtreecommitdiff
path: root/drivers/clk/bcm/clk-iproc-armpll.c
diff options
context:
space:
mode:
authorStephen Boyd <stephen.boyd@linaro.org>2016-06-02 02:15:04 +0300
committerStephen Boyd <sboyd@codeaurora.org>2016-06-30 22:26:45 +0300
commitff02c6c0a4693c858db8918a6215fee85369cd9c (patch)
tree7a01dc5242583aab17c9963775492833a7122275 /drivers/clk/bcm/clk-iproc-armpll.c
parentfb2cd7d07ae0146db95b68c4c31b2d96cd0e9575 (diff)
downloadlinux-ff02c6c0a4693c858db8918a6215fee85369cd9c.tar.xz
clk: bcm: iproc: Migrate to clk_hw based registration and OF APIs
Now that we have clk_hw based provider APIs to register clks, we can get rid of struct clk pointers while registering clks in these drivers, allowing us to move closer to a clear split of consumer and provider clk APIs. Cc: Jon Mason <jonmason@broadcom.com> Cc: Simran Rai <ssimran@broadcom.com> Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org> Tested-by: Ray Jui <rjui@broadcom.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/bcm/clk-iproc-armpll.c')
-rw-r--r--drivers/clk/bcm/clk-iproc-armpll.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/clk/bcm/clk-iproc-armpll.c b/drivers/clk/bcm/clk-iproc-armpll.c
index 698c507921f1..d7d628214b85 100644
--- a/drivers/clk/bcm/clk-iproc-armpll.c
+++ b/drivers/clk/bcm/clk-iproc-armpll.c
@@ -244,7 +244,6 @@ static const struct clk_ops iproc_arm_pll_ops = {
void __init iproc_armpll_setup(struct device_node *node)
{
int ret;
- struct clk *clk;
struct iproc_arm_pll *pll;
struct clk_init_data init;
const char *parent_name;
@@ -265,18 +264,18 @@ void __init iproc_armpll_setup(struct device_node *node)
init.num_parents = (parent_name ? 1 : 0);
pll->hw.init = &init;
- clk = clk_register(NULL, &pll->hw);
- if (WARN_ON(IS_ERR(clk)))
+ ret = clk_hw_register(NULL, &pll->hw);
+ if (WARN_ON(ret))
goto err_iounmap;
- ret = of_clk_add_provider(node, of_clk_src_simple_get, clk);
+ ret = of_clk_add_hw_provider(node, of_clk_hw_simple_get, &pll->hw);
if (WARN_ON(ret))
goto err_clk_unregister;
return;
err_clk_unregister:
- clk_unregister(clk);
+ clk_hw_unregister(&pll->hw);
err_iounmap:
iounmap(pll->base);
err_free_pll: