Skip to content

Commit

Permalink
ASoC: wm2200: match wait_for_completion_timeout return type
Browse files Browse the repository at this point in the history
return type of wait_for_completion_timeout is unsigned long not int. An
appropriately named unsigned long is added and the assignment fixed up.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Nicholas Mc Guire authored and Mark Brown committed Mar 9, 2015
1 parent c517d83 commit 78bb997
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions sound/soc/codecs/wm2200.c
Original file line number Diff line number Diff line change
Expand Up @@ -1942,6 +1942,7 @@ static int wm2200_set_fll(struct snd_soc_codec *codec, int fll_id, int source,
struct wm2200_priv *wm2200 = snd_soc_codec_get_drvdata(codec);
struct _fll_div factors;
int ret, i, timeout;
unsigned long time_left;

if (!Fout) {
dev_dbg(codec->dev, "FLL disabled");
Expand Down Expand Up @@ -2021,9 +2022,10 @@ static int wm2200_set_fll(struct snd_soc_codec *codec, int fll_id, int source,
/* Poll for the lock; will use the interrupt to exit quickly */
for (i = 0; i < timeout; i++) {
if (i2c->irq) {
ret = wait_for_completion_timeout(&wm2200->fll_lock,
msecs_to_jiffies(25));
if (ret > 0)
time_left = wait_for_completion_timeout(
&wm2200->fll_lock,
msecs_to_jiffies(25));
if (time_left > 0)
break;
} else {
msleep(1);
Expand Down

0 comments on commit 78bb997

Please sign in to comment.