diff options
Diffstat (limited to 'drivers/clk/socfpga/clk-periph-a10.c')
-rw-r--r-- | drivers/clk/socfpga/clk-periph-a10.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/clk/socfpga/clk-periph-a10.c b/drivers/clk/socfpga/clk-periph-a10.c index 3e0c55727b89..b9cdde4b8441 100644 --- a/drivers/clk/socfpga/clk-periph-a10.c +++ b/drivers/clk/socfpga/clk-periph-a10.c @@ -61,7 +61,7 @@ static __init void __socfpga_periph_init(struct device_node *node, const struct clk_ops *ops) { u32 reg; - struct clk *clk; + struct clk_hw *hw_clk; struct socfpga_periph_clk *periph_clk; const char *clk_name = node->name; const char *parent_name[SOCFPGA_MAX_PARENTS]; @@ -104,12 +104,13 @@ static __init void __socfpga_periph_init(struct device_node *node, periph_clk->hw.hw.init = &init; - clk = clk_register(NULL, &periph_clk->hw.hw); - if (WARN_ON(IS_ERR(clk))) { + hw_clk = &periph_clk->hw.hw; + + if (clk_hw_register(NULL, hw_clk)) { kfree(periph_clk); return; } - rc = of_clk_add_provider(node, of_clk_src_simple_get, clk); + rc = of_clk_add_provider(node, of_clk_src_simple_get, hw_clk); if (rc < 0) { pr_err("Could not register clock provider for node:%s\n", clk_name); @@ -119,7 +120,7 @@ static __init void __socfpga_periph_init(struct device_node *node, return; err_clk: - clk_unregister(clk); + clk_hw_unregister(hw_clk); } void __init socfpga_a10_periph_init(struct device_node *node) |