summaryrefslogtreecommitdiffstats
path: root/drivers/clk/hisilicon/clk-hip04.c
diff options
context:
space:
mode:
authorHaojian Zhuang <haojian.zhuang@linaro.org>2013-12-24 14:38:26 +0100
committerHaojian Zhuang <haojian.zhuang@gmail.com>2014-03-19 08:31:27 +0100
commit75af25f581b1ffc63e06cb01547b3141d4cd5f58 (patch)
tree12add3b2c60c2ff96f2378ef8860bae9f6a8f23f /drivers/clk/hisilicon/clk-hip04.c
parentclk: hip04: add clock driver (diff)
downloadlinux-75af25f581b1ffc63e06cb01547b3141d4cd5f58.tar.xz
linux-75af25f581b1ffc63e06cb01547b3141d4cd5f58.zip
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.c8
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);