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/wavefront | |
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/wavefront')
-rw-r--r-- | sound/isa/wavefront/wavefront_synth.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/isa/wavefront/wavefront_synth.c b/sound/isa/wavefront/wavefront_synth.c index 0c3c951009d8..abd79b781412 100644 --- a/sound/isa/wavefront/wavefront_synth.c +++ b/sound/isa/wavefront/wavefront_synth.c | |||
@@ -275,8 +275,7 @@ static int | |||
275 | wavefront_sleep (int limit) | 275 | wavefront_sleep (int limit) |
276 | 276 | ||
277 | { | 277 | { |
278 | set_current_state(TASK_INTERRUPTIBLE); | 278 | schedule_timeout_interruptible(limit); |
279 | schedule_timeout(limit); | ||
280 | 279 | ||
281 | return signal_pending(current); | 280 | return signal_pending(current); |
282 | } | 281 | } |
@@ -1788,8 +1787,7 @@ wavefront_should_cause_interrupt (snd_wavefront_t *dev, | |||
1788 | outb (val,port); | 1787 | outb (val,port); |
1789 | spin_unlock_irq(&dev->irq_lock); | 1788 | spin_unlock_irq(&dev->irq_lock); |
1790 | while (1) { | 1789 | while (1) { |
1791 | set_current_state(TASK_INTERRUPTIBLE); | 1790 | if ((timeout = schedule_timeout_interruptible(timeout)) == 0) |
1792 | if ((timeout = schedule_timeout(timeout)) == 0) | ||
1793 | return; | 1791 | return; |
1794 | if (dev->irq_ok) | 1792 | if (dev->irq_ok) |
1795 | return; | 1793 | return; |