Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 62c76fe2 authored by Nicholas Mc Guire's avatar Nicholas Mc Guire Committed by Mark Brown
Browse files

ASoC: wm8996: match wait_for_completion_timeout return type



return type of wait_for_completion_timeout is unsigned long not int. An
appropriately named unsigned long is added and the assignment fixed up
in case of completion occurring the remaining time is >=1 so ret is set to
1 if no timeout occurred.

Signed-off-by: default avatarNicholas Mc Guire <hofrat@osadl.org>
Acked-by: default avatarCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent c517d838
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -2009,7 +2009,7 @@ static int wm8996_set_fll(struct snd_soc_codec *codec, int fll_id, int source,
	struct wm8996_priv *wm8996 = snd_soc_codec_get_drvdata(codec);
	struct i2c_client *i2c = to_i2c_client(codec->dev);
	struct _fll_div fll_div;
	unsigned long timeout;
	unsigned long timeout, time_left;
	int ret, reg, retry;

	/* Any change? */
@@ -2113,10 +2113,11 @@ static int wm8996_set_fll(struct snd_soc_codec *codec, int fll_id, int source,
		timeout /= 2;

	for (retry = 0; retry < 10; retry++) {
		ret = wait_for_completion_timeout(&wm8996->fll_lock,
		time_left = wait_for_completion_timeout(&wm8996->fll_lock,
							timeout);
		if (ret != 0) {
		if (time_left != 0) {
			WARN_ON(!i2c->irq);
			ret = 1;
			break;
		}