summaryrefslogtreecommitdiffstats
path: root/sound/oss/sys_timer.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2015-02-25 14:27:10 +0100
committerTakashi Iwai <tiwai@suse.de>2015-02-25 20:08:07 +0100
commit19449593d60b75654fe33a98c4fb8ff8a38ac1e0 (patch)
treecd5db6628cdd51be6b86e6b8ca8ca5f98fcd6293 /sound/oss/sys_timer.c
parentMerge branch 'topic/timestamp' into for-next (diff)
downloadlinux-19449593d60b75654fe33a98c4fb8ff8a38ac1e0.tar.xz
linux-19449593d60b75654fe33a98c4fb8ff8a38ac1e0.zip
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>
Diffstat (limited to 'sound/oss/sys_timer.c')
-rw-r--r--sound/oss/sys_timer.c35
1 files changed, 15 insertions, 20 deletions
diff --git a/sound/oss/sys_timer.c b/sound/oss/sys_timer.c
index 9f039831114c..2226dda0eff0 100644
--- a/sound/oss/sys_timer.c
+++ b/sound/oss/sys_timer.c
@@ -50,29 +50,24 @@ tmr2ticks(int tmr_value)
static void
poll_def_tmr(unsigned long dummy)
{
+ if (!opened)
+ return;
+ def_tmr.expires = (1) + jiffies;
+ add_timer(&def_tmr);
- if (opened)
- {
+ if (!tmr_running)
+ return;
- {
- def_tmr.expires = (1) + jiffies;
- add_timer(&def_tmr);
- }
+ spin_lock(&lock);
+ tmr_ctr++;
+ curr_ticks = ticks_offs + tmr2ticks(tmr_ctr);
- if (tmr_running)
- {
- spin_lock(&lock);
- tmr_ctr++;
- curr_ticks = ticks_offs + tmr2ticks(tmr_ctr);
-
- if (curr_ticks >= next_event_time)
- {
- next_event_time = (unsigned long) -1;
- sequencer_timer(0);
- }
- spin_unlock(&lock);
- }
- }
+ if (curr_ticks >= next_event_time) {
+ next_event_time = (unsigned long) -1;
+ sequencer_timer(0);
+ }
+
+ spin_unlock(&lock);
}
static void