| .. | .. |
|---|
| 51 | 51 | const struct clk_ops *ops) |
|---|
| 52 | 52 | { |
|---|
| 53 | 53 | u32 reg; |
|---|
| 54 | | - struct clk *clk; |
|---|
| 54 | + struct clk_hw *hw_clk; |
|---|
| 55 | 55 | struct socfpga_periph_clk *periph_clk; |
|---|
| 56 | 56 | const char *clk_name = node->name; |
|---|
| 57 | 57 | const char *parent_name[SOCFPGA_MAX_PARENTS]; |
|---|
| .. | .. |
|---|
| 94 | 94 | init.parent_names = parent_name; |
|---|
| 95 | 95 | |
|---|
| 96 | 96 | periph_clk->hw.hw.init = &init; |
|---|
| 97 | + hw_clk = &periph_clk->hw.hw; |
|---|
| 97 | 98 | |
|---|
| 98 | | - clk = clk_register(NULL, &periph_clk->hw.hw); |
|---|
| 99 | | - if (WARN_ON(IS_ERR(clk))) { |
|---|
| 99 | + if (clk_hw_register(NULL, hw_clk)) { |
|---|
| 100 | 100 | kfree(periph_clk); |
|---|
| 101 | 101 | return; |
|---|
| 102 | 102 | } |
|---|
| 103 | | - rc = of_clk_add_provider(node, of_clk_src_simple_get, clk); |
|---|
| 103 | + rc = of_clk_add_provider(node, of_clk_src_simple_get, hw_clk); |
|---|
| 104 | 104 | } |
|---|
| 105 | 105 | |
|---|
| 106 | 106 | void __init socfpga_periph_init(struct device_node *node) |
|---|