* [PATCH] oss: waveartist: simplify waveartist_sleep()
@ 2010-07-26 8:29 Kulikov Vasiliy
0 siblings, 0 replies; only message in thread
From: Kulikov Vasiliy @ 2010-07-26 8:29 UTC (permalink / raw)
To: kernel-janitors
Cc: Jaroslav Kysela, Takashi Iwai, Tejun Heo, linux-kernel,
alsa-devel
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>
---
sound/oss/waveartist.c | 10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/sound/oss/waveartist.c b/sound/oss/waveartist.c
index e688dde..5246874 100644
--- a/sound/oss/waveartist.c
+++ b/sound/oss/waveartist.c
@@ -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
--
1.7.0.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-07-26 8:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-26 8:29 [PATCH] oss: waveartist: simplify waveartist_sleep() Kulikov Vasiliy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).