diff mbox

[v2,1/4] ASoC: wm_adsp: Use usleep_range for short delay

Message ID 1474881325-9466-1-git-send-email-ckeepax@opensource.wolfsonmicro.com (mailing list archive)
State Accepted
Commit 1fa96f3fdad7cef5d043a502682580d2bc3d5ace
Headers show

Commit Message

Charles Keepax Sept. 26, 2016, 9:15 a.m. UTC
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 <ckeepax@opensource.wolfsonmicro.com>
---

New since the first series of this patch chain.

 sound/soc/codecs/wm_adsp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index 24485ec..4188c37 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)) {