Commit cc819cf8 authored by Manivannan Sadhasivam's avatar Manivannan Sadhasivam Committed by Stephen Boyd

clk: Zero init clk_init_data in helpers

The clk_init_data struct needs to be initialized to zero for the new
parent_map implementation to work correctly. Otherwise, the member which
is available first will get processed.
Signed-off-by: default avatarManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lkml.kernel.org/r/20191115162901.17456-2-manivannan.sadhasivam@linaro.orgSigned-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 54ecb8f7
...@@ -207,7 +207,7 @@ struct clk_hw *clk_hw_register_composite(struct device *dev, const char *name, ...@@ -207,7 +207,7 @@ struct clk_hw *clk_hw_register_composite(struct device *dev, const char *name,
unsigned long flags) unsigned long flags)
{ {
struct clk_hw *hw; struct clk_hw *hw;
struct clk_init_data init; struct clk_init_data init = {};
struct clk_composite *composite; struct clk_composite *composite;
struct clk_ops *clk_composite_ops; struct clk_ops *clk_composite_ops;
int ret; int ret;
......
...@@ -471,7 +471,7 @@ static struct clk_hw *_register_divider(struct device *dev, const char *name, ...@@ -471,7 +471,7 @@ static struct clk_hw *_register_divider(struct device *dev, const char *name,
{ {
struct clk_divider *div; struct clk_divider *div;
struct clk_hw *hw; struct clk_hw *hw;
struct clk_init_data init; struct clk_init_data init = {};
int ret; int ret;
if (clk_divider_flags & CLK_DIVIDER_HIWORD_MASK) { if (clk_divider_flags & CLK_DIVIDER_HIWORD_MASK) {
......
...@@ -58,7 +58,7 @@ struct clk_hw *clk_hw_register_fixed_rate_with_accuracy(struct device *dev, ...@@ -58,7 +58,7 @@ struct clk_hw *clk_hw_register_fixed_rate_with_accuracy(struct device *dev,
{ {
struct clk_fixed_rate *fixed; struct clk_fixed_rate *fixed;
struct clk_hw *hw; struct clk_hw *hw;
struct clk_init_data init; struct clk_init_data init = {};
int ret; int ret;
/* allocate fixed-rate clock */ /* allocate fixed-rate clock */
......
...@@ -141,7 +141,7 @@ struct clk_hw *clk_hw_register_gate(struct device *dev, const char *name, ...@@ -141,7 +141,7 @@ struct clk_hw *clk_hw_register_gate(struct device *dev, const char *name,
{ {
struct clk_gate *gate; struct clk_gate *gate;
struct clk_hw *hw; struct clk_hw *hw;
struct clk_init_data init; struct clk_init_data init = {};
int ret; int ret;
if (clk_gate_flags & CLK_GATE_HIWORD_MASK) { if (clk_gate_flags & CLK_GATE_HIWORD_MASK) {
......
...@@ -153,7 +153,7 @@ struct clk_hw *clk_hw_register_mux_table(struct device *dev, const char *name, ...@@ -153,7 +153,7 @@ struct clk_hw *clk_hw_register_mux_table(struct device *dev, const char *name,
{ {
struct clk_mux *mux; struct clk_mux *mux;
struct clk_hw *hw; struct clk_hw *hw;
struct clk_init_data init; struct clk_init_data init = {};
u8 width = 0; u8 width = 0;
int ret; int ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment