sound: oss: waveartist: simplify waveartist_sleep()
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>
This commit is contained in:
parent
2232e23829
commit
e5de3dfc39
1 changed files with 2 additions and 8 deletions
|
@ -184,14 +184,8 @@ waveartist_iack(wavnc_info *devc)
|
||||||
static inline int
|
static inline int
|
||||||
waveartist_sleep(int timeout_ms)
|
waveartist_sleep(int timeout_ms)
|
||||||
{
|
{
|
||||||
unsigned int timeout = timeout_ms * 10 * HZ / 100;
|
unsigned int timeout = msecs_to_jiffies(timeout_ms*100);
|
||||||
|
return schedule_timeout_interruptible(timeout);
|
||||||
do {
|
|
||||||
set_current_state(TASK_INTERRUPTIBLE);
|
|
||||||
timeout = schedule_timeout(timeout);
|
|
||||||
} while (timeout);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
Loading…
Reference in a new issue