diff options
author | Nishanth Aravamudan <nacc@us.ibm.com> | 2005-10-24 09:02:37 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-11-04 07:19:49 -0500 |
commit | 8433a509c0eb6bb1f33ce39c82c580b8901619ee (patch) | |
tree | f1554905dee5da4e840dfd674d5b004124496a22 /sound/isa/ad1848 | |
parent | d78bec210f07b06f406b877b9179e0cc281ae8e6 (diff) |
[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>
Diffstat (limited to 'sound/isa/ad1848')
-rw-r--r-- | sound/isa/ad1848/ad1848_lib.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/isa/ad1848/ad1848_lib.c b/sound/isa/ad1848/ad1848_lib.c index 744b65a35c9c..891bacc94f68 100644 --- a/sound/isa/ad1848/ad1848_lib.c +++ b/sound/isa/ad1848/ad1848_lib.c | |||
@@ -243,8 +243,7 @@ static void snd_ad1848_mce_down(ad1848_t *chip) | |||
243 | snd_printk(KERN_ERR "mce_down - auto calibration time out (2)\n"); | 243 | snd_printk(KERN_ERR "mce_down - auto calibration time out (2)\n"); |
244 | return; | 244 | return; |
245 | } | 245 | } |
246 | set_current_state(TASK_INTERRUPTIBLE); | 246 | time = schedule_timeout_interruptible(time); |
247 | time = schedule_timeout(time); | ||
248 | spin_lock_irqsave(&chip->reg_lock, flags); | 247 | spin_lock_irqsave(&chip->reg_lock, flags); |
249 | } | 248 | } |
250 | #if 0 | 249 | #if 0 |
@@ -257,8 +256,7 @@ static void snd_ad1848_mce_down(ad1848_t *chip) | |||
257 | snd_printk(KERN_ERR "mce_down - auto calibration time out (3)\n"); | 256 | snd_printk(KERN_ERR "mce_down - auto calibration time out (3)\n"); |
258 | return; | 257 | return; |
259 | } | 258 | } |
260 | set_current_state(TASK_INTERRUPTIBLE); | 259 | time = schedule_timeout_interruptible(time); |
261 | time = schedule_timeout(time); | ||
262 | spin_lock_irqsave(&chip->reg_lock, flags); | 260 | spin_lock_irqsave(&chip->reg_lock, flags); |
263 | } | 261 | } |
264 | spin_unlock_irqrestore(&chip->reg_lock, flags); | 262 | spin_unlock_irqrestore(&chip->reg_lock, flags); |