clk: sunxi: Remove clk_register_clkdev calls
authorMaxime Ripard <maxime.ripard@free-electrons.com>
Tue, 2 Feb 2016 08:37:15 +0000 (09:37 +0100)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Thu, 11 Feb 2016 19:05:47 +0000 (20:05 +0100)
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>
drivers/clk/sunxi/clk-a10-hosc.c
drivers/clk/sunxi/clk-a20-gmac.c
drivers/clk/sunxi/clk-factors.c
drivers/clk/sunxi/clk-factors.h
drivers/clk/sunxi/clk-mod0.c
drivers/clk/sunxi/clk-sun6i-apb0-gates.c
drivers/clk/sunxi/clk-sun9i-core.c
drivers/clk/sunxi/clk-sunxi.c

index 0481d5d673d68a718a8052762c66b78d482543eb..6b598c6a02136d64bee24e23bc0d61ec8d8733c6 100644 (file)
@@ -15,9 +15,9 @@
  */
 
 #include <linux/clk-provider.h>
-#include <linux/clkdev.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
+#include <linux/slab.h>
 
 #define SUNXI_OSC24M_GATE      0
 
@@ -61,7 +61,6 @@ static void __init sun4i_osc_clk_setup(struct device_node *node)
                goto err_free_gate;
 
        of_clk_add_provider(node, of_clk_src_simple_get, clk);
-       clk_register_clkdev(clk, clk_name, NULL);
 
        return;
 
index 1611b036421c20e76f438e13fb326111b24e5cda..3437f734c9bf1f7e2ba95051f2debbf71b3c3444 100644 (file)
@@ -17,7 +17,6 @@
  */
 
 #include <linux/clk-provider.h>
-#include <linux/clkdev.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
 #include <linux/slab.h>
@@ -107,7 +106,6 @@ static void __init sun7i_a20_gmac_clk_setup(struct device_node *node)
                goto iounmap_reg;
 
        of_clk_add_provider(node, of_clk_src_simple_get, clk);
-       clk_register_clkdev(clk, clk_name, NULL);
 
        return;
 
index 6e97f46c0c37bbf7d2ac32ac8e95803edea502ff..ddefe9668863b0ffbaebfc5e33c709c49c2486e2 100644 (file)
@@ -258,14 +258,8 @@ struct clk *sunxi_factors_register(struct device_node *node,
        if (ret)
                goto err_provider;
 
-       ret = clk_register_clkdev(clk, clk_name, NULL);
-       if (ret)
-               goto err_clkdev;
-
        return clk;
 
-err_clkdev:
-       of_clk_del_provider(node);
 err_provider:
        /* TODO: The composite clock stuff will leak a bit here. */
        clk_unregister(clk);
@@ -291,7 +285,6 @@ void sunxi_factors_unregister(struct device_node *node, struct clk *clk)
        factors = to_clk_factors(hw);
        name = clk_hw_get_name(hw);
 
-       /* No unregister call for clkdev_* */
        of_clk_del_provider(node);
        /* TODO: The composite clock stuff will leak a bit here. */
        clk_unregister(clk);
index a44a865a6b9ecd1e95693d7e4c82e1c844aa80de..1e63c5b2d5f4cb6866127100be2274a7095641cd 100644 (file)
@@ -2,7 +2,6 @@
 #define __MACH_SUNXI_CLK_FACTORS_H
 
 #include <linux/clk-provider.h>
-#include <linux/clkdev.h>
 #include <linux/spinlock.h>
 
 #define SUNXI_FACTORS_NOT_APPLICABLE   (0)
index 578bff0dd2513729d0ee8cdf13f4ebe3c0644344..b38d71cec74c78300fce175de198cbd3fcb12623 100644 (file)
@@ -15,6 +15,7 @@
  */
 
 #include <linux/clk.h>
+#include <linux/clkdev.h>
 #include <linux/clk-provider.h>
 #include <linux/of_address.h>
 #include <linux/platform_device.h>
index 23d042aabb4f7724d2cf1602b8a2b1f4028a8c41..68021fa5ecd9af5026a941940e0496329b567d5a 100644 (file)
@@ -9,7 +9,6 @@
  */
 
 #include <linux/clk-provider.h>
-#include <linux/clkdev.h>
 #include <linux/module.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
@@ -87,7 +86,6 @@ static int sun6i_a31_apb0_gates_clk_probe(struct platform_device *pdev)
                                                      clk_parent, 0, reg, i,
                                                      0, NULL);
                WARN_ON(IS_ERR(clk_data->clks[i]));
-               clk_register_clkdev(clk_data->clks[i], clk_name, NULL);
 
                j++;
        }
index a81211062ecb83071a2fa97de00e9cfd2da30295..43f014f85803109aa5cca03dbe045d05a7a4b120 100644 (file)
@@ -15,6 +15,7 @@
  */
 
 #include <linux/clk.h>
+#include <linux/clkdev.h>
 #include <linux/clk-provider.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
index 6c5b104498ca9d08313011619f9c75495637224a..99f60efe7b1cc5f41a45d91ebecdbc54d299c4cf 100644 (file)
@@ -694,7 +694,6 @@ static struct clk * __init sunxi_mux_clk_setup(struct device_node *node,
        }
 
        of_clk_add_provider(node, of_clk_src_simple_get, clk);
-       clk_register_clkdev(clk, clk_name, NULL);
 
        return clk;
 
@@ -806,10 +805,8 @@ static void __init sunxi_divider_clk_setup(struct device_node *node,
                                         reg, data->shift, data->width,
                                         data->pow ? CLK_DIVIDER_POWER_OF_TWO : 0,
                                         data->table, &clk_lock);
-       if (clk) {
+       if (clk)
                of_clk_add_provider(node, of_clk_src_simple_get, clk);
-               clk_register_clkdev(clk, clk_name, NULL);
-       }
 }
 
 static 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,
                                                 clkflags);
 
                WARN_ON(IS_ERR(clk_data->clks[i]));
-               clk_register_clkdev(clks[i], clk_name, NULL);
        }
 
        /* Adjust to the real max */
This page took 0.032878 seconds and 5 git commands to generate.