diff options
author | Nishanth Aravamudan <nacc@us.ibm.com> | 2005-07-09 10:54:37 +0200 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-07-28 12:22:22 +0200 |
commit | b27c187f95cd6c9f13f26a5088bea384ac557b45 (patch) | |
tree | c5d1ff785bda8fa11575ecb71453e53426b6e780 /sound/usb/usbaudio.c | |
parent | 989a0b248bbf32c89e60dc6f02219e446b320712 (diff) | |
download | op-kernel-dev-b27c187f95cd6c9f13f26a5088bea384ac557b45.zip op-kernel-dev-b27c187f95cd6c9f13f26a5088bea384ac557b45.tar.gz |
[ALSA] Fix-up sleeping in sound/usb
USB generic driver,USB USX2Y
Description: Fix-up sleeping in sound/usb. Replace big_mdelay() with
msleep() to guarantee the task delays as expected. This also involved
replacing/removing custom sleep functions.
Patch is compile-tested.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/usb/usbaudio.c')
-rw-r--r-- | sound/usb/usbaudio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c index 3eaa08e..f2b760d 100644 --- a/sound/usb/usbaudio.c +++ b/sound/usb/usbaudio.c @@ -792,7 +792,7 @@ static int start_urbs(snd_usb_substream_t *subs, snd_pcm_runtime_t *runtime) */ static int wait_clear_urbs(snd_usb_substream_t *subs) { - int timeout = HZ; + unsigned long end_time = jiffies + msecs_to_jiffies(1000); unsigned int i; int alive; @@ -812,7 +812,7 @@ static int wait_clear_urbs(snd_usb_substream_t *subs) break; set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout(1); - } while (--timeout > 0); + } while (time_before(jiffies, end_time)); if (alive) snd_printk(KERN_ERR "timeout: still %d active urbs..\n", alive); return 0; |