summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Wojtas <mw@semihalf.com>2016-09-21 11:05:57 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-10-22 12:40:22 +0200
commita6cf0bc85abea21765b1e9529e0122c0cc578653 (patch)
treefada7136d6fd8d03f32c63eadf85869c5ab6bc8a
parent51b2e3517f75fda93a6852a4a209db52a6d2b11d (diff)
clk: mvebu: fix setting unwanted flags in CP110 gate clock
commit ad715b268a501533ecb2e891a624841d1bb5137c upstream. Armada CP110 system controller comprises its own routine responsble for registering gate clocks. Among others 'flags' field in struct clk_init_data was not set, using a random values, which may cause an unpredicted behavior. This patch fixes the problem by resetting all fields of clk_init_data before assigning values for all gated clocks of Armada 7k/8k SoCs family. Fixes: d3da3eaef7f4 ("clk: mvebu: new driver for Armada CP110 system ...") Signed-off-by: Marcin Wojtas <mw@semihalf.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/clk/mvebu/cp110-system-controller.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/clk/mvebu/cp110-system-controller.c b/drivers/clk/mvebu/cp110-system-controller.c
index 7fa42d6b2b92..59fe76e47275 100644
--- a/drivers/clk/mvebu/cp110-system-controller.c
+++ b/drivers/clk/mvebu/cp110-system-controller.c
@@ -142,6 +142,8 @@ static struct clk *cp110_register_gate(const char *name,
if (!gate)
return ERR_PTR(-ENOMEM);
+ memset(&init, 0, sizeof(init));
+
init.name = name;
init.ops = &cp110_gate_ops;
init.parent_names = &parent_name;