提交 19449593 编写于 作者: D Dan Carpenter 提交者: Takashi Iwai

sound: sys_timer: indent poll_def_tmr() correctly

The indenting here was really whacky and not consistent from one line to
the next.  I also reverse the "if (opened)" and "if (tmr_running)" tests
so that I could remove two indent levels.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 72f770c6
...@@ -50,29 +50,24 @@ tmr2ticks(int tmr_value) ...@@ -50,29 +50,24 @@ tmr2ticks(int tmr_value)
static void static void
poll_def_tmr(unsigned long dummy) poll_def_tmr(unsigned long dummy)
{ {
if (!opened)
return;
def_tmr.expires = (1) + jiffies;
add_timer(&def_tmr);
if (opened) if (!tmr_running)
{ return;
{ spin_lock(&lock);
def_tmr.expires = (1) + jiffies; tmr_ctr++;
add_timer(&def_tmr); curr_ticks = ticks_offs + tmr2ticks(tmr_ctr);
}
if (tmr_running) if (curr_ticks >= next_event_time) {
{ next_event_time = (unsigned long) -1;
spin_lock(&lock); sequencer_timer(0);
tmr_ctr++; }
curr_ticks = ticks_offs + tmr2ticks(tmr_ctr);
spin_unlock(&lock);
if (curr_ticks >= next_event_time)
{
next_event_time = (unsigned long) -1;
sequencer_timer(0);
}
spin_unlock(&lock);
}
}
} }
static void static void
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册