[ALSA] Fix schedule_timeout usage

Use schedule_timeout_{,un}interruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size.  Also use
human-time conversion functions instead of hard-coded division to avoid
rounding issues.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
此提交包含在:
Nishanth Aravamudan
2005-10-24 15:02:37 +02:00
提交者 Jaroslav Kysela
父節點 d78bec210f
當前提交 8433a509c0
共有 28 個檔案被更改,包括 51 行新增112 行删除

查看文件

@@ -275,8 +275,7 @@ static int
wavefront_sleep (int limit)
{
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(limit);
schedule_timeout_interruptible(limit);
return signal_pending(current);
}
@@ -1788,8 +1787,7 @@ wavefront_should_cause_interrupt (snd_wavefront_t *dev,
outb (val,port);
spin_unlock_irq(&dev->irq_lock);
while (1) {
set_current_state(TASK_INTERRUPTIBLE);
if ((timeout = schedule_timeout(timeout)) == 0)
if ((timeout = schedule_timeout_interruptible(timeout)) == 0)
return;
if (dev->irq_ok)
return;