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 <segooon@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
committed by
Takashi Iwai
parent
ff388f270d
commit
2232e23829
@@ -163,19 +163,10 @@ ld2(unsigned int x)
|
|||||||
static void
|
static void
|
||||||
au1550_delay(int msec)
|
au1550_delay(int msec)
|
||||||
{
|
{
|
||||||
unsigned long tmo;
|
|
||||||
signed long tmo2;
|
|
||||||
|
|
||||||
if (in_interrupt())
|
if (in_interrupt())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
tmo = jiffies + (msec * HZ) / 1000;
|
schedule_timeout_uninterruptible(msecs_to_jiffies(msec));
|
||||||
for (;;) {
|
|
||||||
tmo2 = tmo - jiffies;
|
|
||||||
if (tmo2 <= 0)
|
|
||||||
break;
|
|
||||||
schedule_timeout(tmo2);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static u16
|
static u16
|
||||||
|
Reference in New Issue
Block a user