[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>
This commit is contained in:
Nishanth Aravamudan
2005-10-24 15:02:37 +02:00
committed by Jaroslav Kysela
父節點 d78bec210f
當前提交 8433a509c0
共有 28 個文件被更改,包括 51 次插入112 次删除

查看文件

@@ -117,8 +117,7 @@ snd_emu8000_write_wait(emu8000_t *emu, int can_schedule)
{
while ((EMU8000_SMALW_READ(emu) & 0x80000000) != 0) {
if (can_schedule) {
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(1);
schedule_timeout_interruptible(1);
if (signal_pending(current))
break;
}