aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/generic
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2014-09-08 07:14:05 -0400
committerMark Brown <broonie@kernel.org>2014-09-10 06:56:42 -0400
commit88a60e552f114ae34796604575239fb196658067 (patch)
tree6c00c2cee836d509b7b843db97d33b2645b3b718 /sound/soc/generic
parent0dd4fc3c2f663b9124855daf3fd841d70b4dbeea (diff)
ASoC: simple-card: fix regression in clock rate lookup
Commit 7c7b9cf53d284f ("ASoC: simple-card: fixup cpu_dai_name clear case") changed the way that "sound-dai" properties are handled, which leads to the clock frequency not being picked up from the node that the phandle points to, as correctly identified by gcc with this warning: sound/soc/generic/simple-card.c: In function 'asoc_simple_card_sub_parse_of': sound/soc/generic/simple-card.c:165:7: warning: 'node' may be used uninitialized in this function [-Wmaybe-uninitialized] This restores the previous behavior by using the node from of_parse_phandle_with_args() that was previously being returned from of_parse_phandle(). Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/generic')
-rw-r--r--sound/soc/generic/simple-card.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index f79347c4c62f..106fdada8640 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -116,7 +116,6 @@ asoc_simple_card_sub_parse_of(struct device_node *np,
116 int *args_count) 116 int *args_count)
117{ 117{
118 struct of_phandle_args args; 118 struct of_phandle_args args;
119 struct device_node *node;
120 struct clk *clk; 119 struct clk *clk;
121 u32 val; 120 u32 val;
122 int ret; 121 int ret;
@@ -162,7 +161,7 @@ asoc_simple_card_sub_parse_of(struct device_node *np,
162 } else if (!of_property_read_u32(np, "system-clock-frequency", &val)) { 161 } else if (!of_property_read_u32(np, "system-clock-frequency", &val)) {
163 dai->sysclk = val; 162 dai->sysclk = val;
164 } else { 163 } else {
165 clk = of_clk_get(node, 0); 164 clk = of_clk_get(args.np, 0);
166 if (!IS_ERR(clk)) 165 if (!IS_ERR(clk))
167 dai->sysclk = clk_get_rate(clk); 166 dai->sysclk = clk_get_rate(clk);
168 } 167 }