Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: highbank: 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 in this driver, allowing us to
move closer to a clear split of consumer and provider clk APIs.

Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>

authored by

Stephen Boyd and committed by
Stephen Boyd
8e66cc05 1ff435d3

+4 -5
+4 -5
drivers/clk/clk-highbank.c
··· 275 275 static __init struct clk *hb_clk_init(struct device_node *node, const struct clk_ops *ops) 276 276 { 277 277 u32 reg; 278 - struct clk *clk; 279 278 struct hb_clk *hb_clk; 280 279 const char *clk_name = node->name; 281 280 const char *parent_name; ··· 307 308 308 309 hb_clk->hw.init = &init; 309 310 310 - clk = clk_register(NULL, &hb_clk->hw); 311 - if (WARN_ON(IS_ERR(clk))) { 311 + rc = clk_hw_register(NULL, &hb_clk->hw); 312 + if (WARN_ON(rc)) { 312 313 kfree(hb_clk); 313 314 return NULL; 314 315 } 315 - rc = of_clk_add_provider(node, of_clk_src_simple_get, clk); 316 - return clk; 316 + rc = of_clk_add_hw_provider(node, of_clk_hw_simple_get, &hb_clk->hw); 317 + return hb_clk->hw.clk; 317 318 } 318 319 319 320 static void __init hb_pll_init(struct device_node *node)