Skip to content

Commit

Permalink
sound: oss: au1550_ac97: simplify au1550_delay()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kulikov Vasiliy authored and Takashi Iwai committed Jul 26, 2010
1 parent ff388f2 commit 2232e23
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions sound/oss/au1550_ac97.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2232e23

Please sign in to comment.