forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 748e4f3d702def1a4bff191e0cf93b6a05340f01
kernel/drivers/clk/sunxi-ng/ccu_common.c
....@@ -1,17 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright 2016 Maxime Ripard
34 *
45 * 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.
156 */
167
178 #include <linux/clk.h>
....@@ -106,14 +97,15 @@
10697
10798 for (i = 0; i < desc->hw_clks->num ; i++) {
10899 struct clk_hw *hw = desc->hw_clks->hws[i];
100
+ const char *name;
109101
110102 if (!hw)
111103 continue;
112104
113
- ret = clk_hw_register(NULL, hw);
105
+ name = hw->init->name;
106
+ ret = of_clk_hw_register(node, hw);
114107 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);
117109 goto err_clk_unreg;
118110 }
119111 }