[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>
Bu işleme şunda yer alıyor:
Nishanth Aravamudan
2005-10-24 15:02:37 +02:00
işlemeyi yapan: Jaroslav Kysela
ebeveyn d78bec210f
işleme 8433a509c0
28 değiştirilmiş dosya ile 51 ekleme ve 112 silme

Dosyayı Görüntüle

@@ -243,8 +243,7 @@ static void snd_ad1848_mce_down(ad1848_t *chip)
snd_printk(KERN_ERR "mce_down - auto calibration time out (2)\n");
return;
}
set_current_state(TASK_INTERRUPTIBLE);
time = schedule_timeout(time);
time = schedule_timeout_interruptible(time);
spin_lock_irqsave(&chip->reg_lock, flags);
}
#if 0
@@ -257,8 +256,7 @@ static void snd_ad1848_mce_down(ad1848_t *chip)
snd_printk(KERN_ERR "mce_down - auto calibration time out (3)\n");
return;
}
set_current_state(TASK_INTERRUPTIBLE);
time = schedule_timeout(time);
time = schedule_timeout_interruptible(time);
spin_lock_irqsave(&chip->reg_lock, flags);
}
spin_unlock_irqrestore(&chip->reg_lock, flags);