Skip to content

Commit

Permalink
sound: oss: waveartist: simplify waveartist_sleep()
Browse files Browse the repository at this point in the history
waveartist_sleep() uses loop with schedule_timeout() to unconditionally
wait for msec. Use schedule_timeout_uninteruptible() instead.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Kulikov Vasiliy authored and Takashi Iwai committed Jul 26, 2010
1 parent 2232e23 commit e5de3df
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions sound/oss/waveartist.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,8 @@ waveartist_iack(wavnc_info *devc)
static inline int
waveartist_sleep(int timeout_ms)
{
unsigned int timeout = timeout_ms * 10 * HZ / 100;

do {
set_current_state(TASK_INTERRUPTIBLE);
timeout = schedule_timeout(timeout);
} while (timeout);

return 0;
unsigned int timeout = msecs_to_jiffies(timeout_ms*100);
return schedule_timeout_interruptible(timeout);
}

static int
Expand Down

0 comments on commit e5de3df

Please sign in to comment.