diff options
author | Xiubo Li <lixiubo@cmss.chinamobile.com> | 2016-01-15 06:35:25 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-01-22 11:48:34 -0500 |
commit | 0d55ad456337487e8cdb72acdd520050e575a0bd (patch) | |
tree | a2110934423c2848e961cbe6e192560244726d46 | |
parent | 822ad70a2f5c420da5baa9f4354e6b7813ca6da9 (diff) |
ASoC: fsl-mpc5200: Use usleep_range() instead of msleep()
Since msleep() will sleep longer than intended time for values less
than 20ms, this patch allows the use of usleep_range for just 1ms.
usleep_range is a finer precision implementation of msleep and is
designed to be a drop-in replacement for udelay where a precise
sleep/busy-wait is unnecessary.
More details see Documentation/timers/timers-howto.txt.
Signed-off-by: Xiubo Li <lixiubo@cmss.chinamobile.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/fsl/mpc5200_psc_ac97.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/fsl/mpc5200_psc_ac97.c b/sound/soc/fsl/mpc5200_psc_ac97.c index 0bab76051fd8..243700cc29e6 100644 --- a/sound/soc/fsl/mpc5200_psc_ac97.c +++ b/sound/soc/fsl/mpc5200_psc_ac97.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/of_device.h> | 13 | #include <linux/of_device.h> |
14 | #include <linux/of_platform.h> | 14 | #include <linux/of_platform.h> |
15 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
16 | #include <linux/time.h> | ||
16 | 17 | ||
17 | #include <sound/pcm.h> | 18 | #include <sound/pcm.h> |
18 | #include <sound/pcm_params.h> | 19 | #include <sound/pcm_params.h> |
@@ -127,7 +128,7 @@ static void psc_ac97_cold_reset(struct snd_ac97 *ac97) | |||
127 | 128 | ||
128 | mutex_unlock(&psc_dma->mutex); | 129 | mutex_unlock(&psc_dma->mutex); |
129 | 130 | ||
130 | msleep(1); | 131 | usleep_range(1000, 2000); |
131 | psc_ac97_warm_reset(ac97); | 132 | psc_ac97_warm_reset(ac97); |
132 | } | 133 | } |
133 | 134 | ||