1 From 8a3282a0a185108e37e7a48437b58d956ff56f4a Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= <emilio@elopez.com.ar>
3 Date: Mon, 23 Dec 2013 00:32:36 -0300
4 Subject: [PATCH] clk: sunxi: make factors_clk_setup return the clock it
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
10 We will be needing this to register a factor clock as parent with leaf
11 divisors on a single call.
13 Signed-off-by: Emilio López <emilio@elopez.com.ar>
14 Acked-by: Mike Turquette <mturquette@linaro.org>
16 drivers/clk/sunxi/clk-sunxi.c | 15 ++++++++-------
17 1 file changed, 8 insertions(+), 7 deletions(-)
19 --- a/drivers/clk/sunxi/clk-sunxi.c
20 +++ b/drivers/clk/sunxi/clk-sunxi.c
21 @@ -317,8 +317,8 @@ static const struct factors_data sun4i_a
22 .getter = sun4i_get_apb1_factors,
25 -static void __init sunxi_factors_clk_setup(struct device_node *node,
26 - struct factors_data *data)
27 +static struct clk * __init sunxi_factors_clk_setup(struct device_node *node,
28 + const struct factors_data *data)
31 struct clk_factors *factors;
32 @@ -340,14 +340,14 @@ static void __init sunxi_factors_clk_set
34 factors = kzalloc(sizeof(struct clk_factors), GFP_KERNEL);
39 /* Add a gate if this factor clock can be gated */
41 gate = kzalloc(sizeof(struct clk_gate), GFP_KERNEL);
48 /* set up gate properties */
49 @@ -363,7 +363,7 @@ static void __init sunxi_factors_clk_set
57 /* set up gate properties */
58 @@ -384,13 +384,14 @@ static void __init sunxi_factors_clk_set
61 &factors->hw, &clk_factors_ops,
62 - gate_hw, &clk_gate_ops,
63 - i ? 0 : CLK_IS_ROOT);
64 + gate_hw, &clk_gate_ops, 0);
67 of_clk_add_provider(node, of_clk_src_simple_get, clk);
68 clk_register_clkdev(clk, clk_name, NULL);