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: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Dan Carpenter 2015-02-25 16:27:10 +03:00 committed by Takashi Iwai
parent 72f770c6ac
commit 19449593d6

View file

@ -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)
if (opened) return;
{
{
def_tmr.expires = (1) + jiffies; def_tmr.expires = (1) + jiffies;
add_timer(&def_tmr); add_timer(&def_tmr);
}
if (tmr_running) if (!tmr_running)
{ return;
spin_lock(&lock); spin_lock(&lock);
tmr_ctr++; tmr_ctr++;
curr_ticks = ticks_offs + tmr2ticks(tmr_ctr); curr_ticks = ticks_offs + tmr2ticks(tmr_ctr);
if (curr_ticks >= next_event_time) if (curr_ticks >= next_event_time) {
{
next_event_time = (unsigned long) -1; next_event_time = (unsigned long) -1;
sequencer_timer(0); sequencer_timer(0);
} }
spin_unlock(&lock); spin_unlock(&lock);
}
}
} }
static void static void