[PATCH] ASoC: arizona: match wait_for_completion_timeout return type

From: Nicholas Mc Guire
Date: Sun Mar 08 2015 - 09:21:34 EST


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@xxxxxxxxx>
---

Note that the error message
"Timed out waiting for lock"
might not be that clear in a kernel log message as it
could probably be read as relating to a kernel lock
"Timed out waiting for FLL lock"
might be clearer.

This was only compile tested for exynos_defconfig + CONFIG_COMPILE_TEST=y
SND_SOC_ALL_CODECS=m, EXTCON_ARIZONA=m, CONFIG_MFD_ARIZONA_SPI=m,
CONFIG_MFD_WM5102=y, (implies SND_SOC_ARIZONA=m)

Patch is against 4.0-rc2 linux-next (localversion-next is -next-20150306)

sound/soc/codecs/arizona.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c
index 95d31d6..57da0ce 100644
--- a/sound/soc/codecs/arizona.c
+++ b/sound/soc/codecs/arizona.c
@@ -1902,7 +1902,7 @@ static int arizona_is_enabled_fll(struct arizona_fll *fll)
static int arizona_enable_fll(struct arizona_fll *fll)
{
struct arizona *arizona = fll->arizona;
- int ret;
+ unsigned long time_left;
bool use_sync = false;
int already_enabled = arizona_is_enabled_fll(fll);
struct arizona_fll_cfg cfg;
@@ -1978,9 +1978,9 @@ static int arizona_enable_fll(struct arizona_fll *fll)
regmap_update_bits_async(arizona->regmap, fll->base + 1,
ARIZONA_FLL1_FREERUN, 0);

- ret = wait_for_completion_timeout(&fll->ok,
+ time_left = wait_for_completion_timeout(&fll->ok,
msecs_to_jiffies(250));
- if (ret == 0)
+ if (time_left == 0)
arizona_fll_warn(fll, "Timed out waiting for lock\n");

return 0;
--
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/