From: Kulikov Vasiliy Date: Mon, 26 Jul 2010 08:28:32 +0000 (+0400) Subject: sound: oss: au1550_ac97: simplify au1550_delay() X-Git-Tag: v2.6.36-rc1~493^2^2~11 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=2232e238295d8ea707fe4271ffbfd4f32346aa81;p=karo-tx-linux.git sound: oss: au1550_ac97: simplify au1550_delay() au1550_delay() uses loop with schedule_timeout() to unconditionally wait for msec. Use schedule_timeout_uninteruptible() instead. Signed-off-by: Kulikov Vasiliy Signed-off-by: Takashi Iwai --- diff --git a/sound/oss/au1550_ac97.c b/sound/oss/au1550_ac97.c index 0fd256ceea6b..c4a4cdc07ab9 100644 --- a/sound/oss/au1550_ac97.c +++ b/sound/oss/au1550_ac97.c @@ -163,19 +163,10 @@ ld2(unsigned int x) static void au1550_delay(int msec) { - unsigned long tmo; - signed long tmo2; - if (in_interrupt()) return; - tmo = jiffies + (msec * HZ) / 1000; - for (;;) { - tmo2 = tmo - jiffies; - if (tmo2 <= 0) - break; - schedule_timeout(tmo2); - } + schedule_timeout_uninterruptible(msecs_to_jiffies(msec)); } static u16