[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:

committed by
Jaroslav Kysela

父節點
d78bec210f
當前提交
8433a509c0
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user