From: Charles Keepax Date: Mon, 26 Sep 2016 09:15:22 +0000 (+0100) Subject: ASoC: wm_adsp: Use usleep_range for short delay X-Git-Tag: v4.9-rc1~120^2^2~10^4~4 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=1fa96f3fdad7cef5d043a502682580d2bc3d5ace;p=linux.git ASoC: wm_adsp: Use usleep_range for short delay Replace the 1ms msleep in wm_adsp2_ena with a usleep_range, as per normal guidance on delay functions. Also tighten up the delay a little as 1ms was quite generous. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index 24485ec5866f..4188c3763bc3 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c @@ -2237,7 +2237,7 @@ static int wm_adsp2_ena(struct wm_adsp *dsp) if (val & ADSP2_RAM_RDY) break; - msleep(1); + usleep_range(250, 500); } if (!(val & ADSP2_RAM_RDY)) {