Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 157583
b: refs/heads/master
c: 8aa2df5
h: refs/heads/master
i:
  157581: 308807d
  157579: bcd8c6e
  157575: ee10816
  157567: 913456e
v: v3
  • Loading branch information
Mark Brown committed Jul 17, 2009
1 parent 8014dd1 commit 1e70f3a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c5910a703889cf44ac1aa9405642a7d3b5bc6f24
refs/heads/master: 8aa2df53088f024b13cb005956bd6da94cc1fd2d
9 changes: 7 additions & 2 deletions trunk/sound/soc/codecs/wm8400.c
Original file line number Diff line number Diff line change
Expand Up @@ -1022,10 +1022,15 @@ static int wm8400_set_dai_pll(struct snd_soc_dai *codec_dai, int pll_id,
if (freq_in == wm8400->fll_in && freq_out == wm8400->fll_out)
return 0;

if (freq_out != 0) {
if (freq_out) {
ret = fll_factors(wm8400, &factors, freq_in, freq_out);
if (ret != 0)
return ret;
} else {
/* Bodge GCC 4.4.0 uninitialised variable warning - it
* doesn't seem capable of working out that we exit if
* freq_out is 0 before any of the uses. */
memset(&factors, 0, sizeof(factors));
}

wm8400->fll_out = freq_out;
Expand All @@ -1040,7 +1045,7 @@ static int wm8400_set_dai_pll(struct snd_soc_dai *codec_dai, int pll_id,
reg &= ~WM8400_FLL_OSC_ENA;
wm8400_write(codec, WM8400_FLL_CONTROL_1, reg);

if (freq_out == 0)
if (!freq_out)
return 0;

reg &= ~(WM8400_FLL_REF_FREQ | WM8400_FLL_FRATIO_MASK);
Expand Down

0 comments on commit 1e70f3a

Please sign in to comment.