diff options
author | Haojian Zhuang <haojian.zhuang@linaro.org> | 2013-12-24 17:38:26 +0400 |
---|---|---|
committer | Haojian Zhuang <haojian.zhuang@gmail.com> | 2014-03-19 11:31:27 +0400 |
commit | 75af25f581b1ffc63e06cb01547b3141d4cd5f58 (patch) | |
tree | 12add3b2c60c2ff96f2378ef8860bae9f6a8f23f /drivers/clk/hisilicon/clk-hip04.c | |
parent | d3e6573c48f4472147b37e92cb345271e04d34d9 (diff) | |
download | linux-75af25f581b1ffc63e06cb01547b3141d4cd5f58.tar.xz |
clk: hisi: remove static variable
Remove the static variable. So these common clock register helper could
be used in more SoCs.
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Diffstat (limited to 'drivers/clk/hisilicon/clk-hip04.c')
-rw-r--r-- | drivers/clk/hisilicon/clk-hip04.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/clk/hisilicon/clk-hip04.c b/drivers/clk/hisilicon/clk-hip04.c index bdc6cd05f4ca..132b57a0ce09 100644 --- a/drivers/clk/hisilicon/clk-hip04.c +++ b/drivers/clk/hisilicon/clk-hip04.c @@ -45,10 +45,14 @@ static struct hisi_fixed_rate_clock hip04_fixed_rate_clks[] __initdata = { static void __init hip04_clk_init(struct device_node *np) { - hisi_clk_init(np, HIP04_NR_CLKS); + struct hisi_clock_data *clk_data; + + clk_data = hisi_clk_init(np, HIP04_NR_CLKS); + if (!clk_data) + return; hisi_clk_register_fixed_rate(hip04_fixed_rate_clks, ARRAY_SIZE(hip04_fixed_rate_clks), - NULL); + clk_data); } CLK_OF_DECLARE(hip04_clk, "hisilicon,hip04-clock", hip04_clk_init); |