.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright 2016 Maxime Ripard |
---|
3 | 4 | * |
---|
4 | 5 | * Maxime Ripard <maxime.ripard@free-electrons.com> |
---|
5 | | - * |
---|
6 | | - * This program is free software; you can redistribute it and/or modify |
---|
7 | | - * it under the terms of the GNU General Public License as published by |
---|
8 | | - * the Free Software Foundation; either version 2 of the License, or |
---|
9 | | - * (at your option) any later version. |
---|
10 | | - * |
---|
11 | | - * This program is distributed in the hope that it will be useful, |
---|
12 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
13 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
14 | | - * GNU General Public License for more details. |
---|
15 | 6 | */ |
---|
16 | 7 | |
---|
17 | 8 | #include <linux/clk.h> |
---|
.. | .. |
---|
106 | 97 | |
---|
107 | 98 | for (i = 0; i < desc->hw_clks->num ; i++) { |
---|
108 | 99 | struct clk_hw *hw = desc->hw_clks->hws[i]; |
---|
| 100 | + const char *name; |
---|
109 | 101 | |
---|
110 | 102 | if (!hw) |
---|
111 | 103 | continue; |
---|
112 | 104 | |
---|
113 | | - ret = clk_hw_register(NULL, hw); |
---|
| 105 | + name = hw->init->name; |
---|
| 106 | + ret = of_clk_hw_register(node, hw); |
---|
114 | 107 | if (ret) { |
---|
115 | | - pr_err("Couldn't register clock %d - %s\n", |
---|
116 | | - i, clk_hw_get_name(hw)); |
---|
| 108 | + pr_err("Couldn't register clock %d - %s\n", i, name); |
---|
117 | 109 | goto err_clk_unreg; |
---|
118 | 110 | } |
---|
119 | 111 | } |
---|