summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxime Ripard <maxime.ripard@free-electrons.com>2016-02-02 03:37:15 -0500
committerMaxime Ripard <maxime.ripard@free-electrons.com>2016-02-11 14:05:47 -0500
commitb0b6413f0dc8d1faba98745cf3a008ed9493df59 (patch)
tree083493bac66a3e56757252e19f9eb6d1a197aeb8
parent3a4d9af48a947b6605fb3a17505da94d70d05de4 (diff)
clk: sunxi: Remove clk_register_clkdev calls
Now that our protection code doesn't use the global name lookup anymore, we can remove the clkdev registrations. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
-rw-r--r--drivers/clk/sunxi/clk-a10-hosc.c3
-rw-r--r--drivers/clk/sunxi/clk-a20-gmac.c2
-rw-r--r--drivers/clk/sunxi/clk-factors.c7
-rw-r--r--drivers/clk/sunxi/clk-factors.h1
-rw-r--r--drivers/clk/sunxi/clk-mod0.c1
-rw-r--r--drivers/clk/sunxi/clk-sun6i-apb0-gates.c2
-rw-r--r--drivers/clk/sunxi/clk-sun9i-core.c1
-rw-r--r--drivers/clk/sunxi/clk-sunxi.c6
8 files changed, 4 insertions, 19 deletions
diff --git a/drivers/clk/sunxi/clk-a10-hosc.c b/drivers/clk/sunxi/clk-a10-hosc.c
index 0481d5d673d6..6b598c6a0213 100644
--- a/drivers/clk/sunxi/clk-a10-hosc.c
+++ b/drivers/clk/sunxi/clk-a10-hosc.c
@@ -15,9 +15,9 @@
15 */ 15 */
16 16
17#include <linux/clk-provider.h> 17#include <linux/clk-provider.h>
18#include <linux/clkdev.h>
19#include <linux/of.h> 18#include <linux/of.h>
20#include <linux/of_address.h> 19#include <linux/of_address.h>
20#include <linux/slab.h>
21 21
22#define SUNXI_OSC24M_GATE 0 22#define SUNXI_OSC24M_GATE 0
23 23
@@ -61,7 +61,6 @@ static void __init sun4i_osc_clk_setup(struct device_node *node)
61 goto err_free_gate; 61 goto err_free_gate;
62 62
63 of_clk_add_provider(node, of_clk_src_simple_get, clk); 63 of_clk_add_provider(node, of_clk_src_simple_get, clk);
64 clk_register_clkdev(clk, clk_name, NULL);
65 64
66 return; 65 return;
67 66
diff --git a/drivers/clk/sunxi/clk-a20-gmac.c b/drivers/clk/sunxi/clk-a20-gmac.c
index 1611b036421c..3437f734c9bf 100644
--- a/drivers/clk/sunxi/clk-a20-gmac.c
+++ b/drivers/clk/sunxi/clk-a20-gmac.c
@@ -17,7 +17,6 @@
17 */ 17 */
18 18
19#include <linux/clk-provider.h> 19#include <linux/clk-provider.h>
20#include <linux/clkdev.h>
21#include <linux/of.h> 20#include <linux/of.h>
22#include <linux/of_address.h> 21#include <linux/of_address.h>
23#include <linux/slab.h> 22#include <linux/slab.h>
@@ -107,7 +106,6 @@ static void __init sun7i_a20_gmac_clk_setup(struct device_node *node)
107 goto iounmap_reg; 106 goto iounmap_reg;
108 107
109 of_clk_add_provider(node, of_clk_src_simple_get, clk); 108 of_clk_add_provider(node, of_clk_src_simple_get, clk);
110 clk_register_clkdev(clk, clk_name, NULL);
111 109
112 return; 110 return;
113 111
diff --git a/drivers/clk/sunxi/clk-factors.c b/drivers/clk/sunxi/clk-factors.c
index 6e97f46c0c37..ddefe9668863 100644
--- a/drivers/clk/sunxi/clk-factors.c
+++ b/drivers/clk/sunxi/clk-factors.c
@@ -258,14 +258,8 @@ struct clk *sunxi_factors_register(struct device_node *node,
258 if (ret) 258 if (ret)
259 goto err_provider; 259 goto err_provider;
260 260
261 ret = clk_register_clkdev(clk, clk_name, NULL);
262 if (ret)
263 goto err_clkdev;
264
265 return clk; 261 return clk;
266 262
267err_clkdev:
268 of_clk_del_provider(node);
269err_provider: 263err_provider:
270 /* TODO: The composite clock stuff will leak a bit here. */ 264 /* TODO: The composite clock stuff will leak a bit here. */
271 clk_unregister(clk); 265 clk_unregister(clk);
@@ -291,7 +285,6 @@ void sunxi_factors_unregister(struct device_node *node, struct clk *clk)
291 factors = to_clk_factors(hw); 285 factors = to_clk_factors(hw);
292 name = clk_hw_get_name(hw); 286 name = clk_hw_get_name(hw);
293 287
294 /* No unregister call for clkdev_* */
295 of_clk_del_provider(node); 288 of_clk_del_provider(node);
296 /* TODO: The composite clock stuff will leak a bit here. */ 289 /* TODO: The composite clock stuff will leak a bit here. */
297 clk_unregister(clk); 290 clk_unregister(clk);
diff --git a/drivers/clk/sunxi/clk-factors.h b/drivers/clk/sunxi/clk-factors.h
index a44a865a6b9e..1e63c5b2d5f4 100644
--- a/drivers/clk/sunxi/clk-factors.h
+++ b/drivers/clk/sunxi/clk-factors.h
@@ -2,7 +2,6 @@
2#define __MACH_SUNXI_CLK_FACTORS_H 2#define __MACH_SUNXI_CLK_FACTORS_H
3 3
4#include <linux/clk-provider.h> 4#include <linux/clk-provider.h>
5#include <linux/clkdev.h>
6#include <linux/spinlock.h> 5#include <linux/spinlock.h>
7 6
8#define SUNXI_FACTORS_NOT_APPLICABLE (0) 7#define SUNXI_FACTORS_NOT_APPLICABLE (0)
diff --git a/drivers/clk/sunxi/clk-mod0.c b/drivers/clk/sunxi/clk-mod0.c
index 578bff0dd251..b38d71cec74c 100644
--- a/drivers/clk/sunxi/clk-mod0.c
+++ b/drivers/clk/sunxi/clk-mod0.c
@@ -15,6 +15,7 @@
15 */ 15 */
16 16
17#include <linux/clk.h> 17#include <linux/clk.h>
18#include <linux/clkdev.h>
18#include <linux/clk-provider.h> 19#include <linux/clk-provider.h>
19#include <linux/of_address.h> 20#include <linux/of_address.h>
20#include <linux/platform_device.h> 21#include <linux/platform_device.h>
diff --git a/drivers/clk/sunxi/clk-sun6i-apb0-gates.c b/drivers/clk/sunxi/clk-sun6i-apb0-gates.c
index 23d042aabb4f..68021fa5ecd9 100644
--- a/drivers/clk/sunxi/clk-sun6i-apb0-gates.c
+++ b/drivers/clk/sunxi/clk-sun6i-apb0-gates.c
@@ -9,7 +9,6 @@
9 */ 9 */
10 10
11#include <linux/clk-provider.h> 11#include <linux/clk-provider.h>
12#include <linux/clkdev.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/of.h> 13#include <linux/of.h>
15#include <linux/of_device.h> 14#include <linux/of_device.h>
@@ -87,7 +86,6 @@ static int sun6i_a31_apb0_gates_clk_probe(struct platform_device *pdev)
87 clk_parent, 0, reg, i, 86 clk_parent, 0, reg, i,
88 0, NULL); 87 0, NULL);
89 WARN_ON(IS_ERR(clk_data->clks[i])); 88 WARN_ON(IS_ERR(clk_data->clks[i]));
90 clk_register_clkdev(clk_data->clks[i], clk_name, NULL);
91 89
92 j++; 90 j++;
93 } 91 }
diff --git a/drivers/clk/sunxi/clk-sun9i-core.c b/drivers/clk/sunxi/clk-sun9i-core.c
index a81211062ecb..43f014f85803 100644
--- a/drivers/clk/sunxi/clk-sun9i-core.c
+++ b/drivers/clk/sunxi/clk-sun9i-core.c
@@ -15,6 +15,7 @@
15 */ 15 */
16 16
17#include <linux/clk.h> 17#include <linux/clk.h>
18#include <linux/clkdev.h>
18#include <linux/clk-provider.h> 19#include <linux/clk-provider.h>
19#include <linux/of.h> 20#include <linux/of.h>
20#include <linux/of_address.h> 21#include <linux/of_address.h>
diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c
index 6c5b104498ca..99f60efe7b1c 100644
--- a/drivers/clk/sunxi/clk-sunxi.c
+++ b/drivers/clk/sunxi/clk-sunxi.c
@@ -694,7 +694,6 @@ static struct clk * __init sunxi_mux_clk_setup(struct device_node *node,
694 } 694 }
695 695
696 of_clk_add_provider(node, of_clk_src_simple_get, clk); 696 of_clk_add_provider(node, of_clk_src_simple_get, clk);
697 clk_register_clkdev(clk, clk_name, NULL);
698 697
699 return clk; 698 return clk;
700 699
@@ -806,10 +805,8 @@ static void __init sunxi_divider_clk_setup(struct device_node *node,
806 reg, data->shift, data->width, 805 reg, data->shift, data->width,
807 data->pow ? CLK_DIVIDER_POWER_OF_TWO : 0, 806 data->pow ? CLK_DIVIDER_POWER_OF_TWO : 0,
808 data->table, &clk_lock); 807 data->table, &clk_lock);
809 if (clk) { 808 if (clk)
810 of_clk_add_provider(node, of_clk_src_simple_get, clk); 809 of_clk_add_provider(node, of_clk_src_simple_get, clk);
811 clk_register_clkdev(clk, clk_name, NULL);
812 }
813} 810}
814 811
815static void __init sun4i_ahb_clk_setup(struct device_node *node) 812static void __init sun4i_ahb_clk_setup(struct device_node *node)
@@ -1033,7 +1030,6 @@ static struct clk ** __init sunxi_divs_clk_setup(struct device_node *node,
1033 clkflags); 1030 clkflags);
1034 1031
1035 WARN_ON(IS_ERR(clk_data->clks[i])); 1032 WARN_ON(IS_ERR(clk_data->clks[i]));
1036 clk_register_clkdev(clks[i], clk_name, NULL);
1037 } 1033 }
1038 1034
1039 /* Adjust to the real max */ 1035 /* Adjust to the real max */