diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2015-02-25 08:27:10 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-02-25 14:08:07 -0500 |
commit | 19449593d60b75654fe33a98c4fb8ff8a38ac1e0 (patch) | |
tree | cd5db6628cdd51be6b86e6b8ca8ca5f98fcd6293 | |
parent | 72f770c6acde425eaad8f482969a785af4512f4f (diff) |
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>
-rw-r--r-- | sound/oss/sys_timer.c | 35 |
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) | |||
50 | static void | 50 | static void |
51 | poll_def_tmr(unsigned long dummy) | 51 | poll_def_tmr(unsigned long dummy) |
52 | { | 52 | { |
53 | if (!opened) | ||
54 | return; | ||
55 | def_tmr.expires = (1) + jiffies; | ||
56 | add_timer(&def_tmr); | ||
53 | 57 | ||
54 | if (opened) | 58 | if (!tmr_running) |
55 | { | 59 | return; |
56 | 60 | ||
57 | { | 61 | spin_lock(&lock); |
58 | def_tmr.expires = (1) + jiffies; | 62 | tmr_ctr++; |
59 | add_timer(&def_tmr); | 63 | curr_ticks = ticks_offs + tmr2ticks(tmr_ctr); |
60 | } | ||
61 | 64 | ||
62 | if (tmr_running) | 65 | if (curr_ticks >= next_event_time) { |
63 | { | 66 | next_event_time = (unsigned long) -1; |
64 | spin_lock(&lock); | 67 | sequencer_timer(0); |
65 | tmr_ctr++; | 68 | } |
66 | curr_ticks = ticks_offs + tmr2ticks(tmr_ctr); | 69 | |
67 | 70 | spin_unlock(&lock); | |
68 | if (curr_ticks >= next_event_time) | ||
69 | { | ||
70 | next_event_time = (unsigned long) -1; | ||
71 | sequencer_timer(0); | ||
72 | } | ||
73 | spin_unlock(&lock); | ||
74 | } | ||
75 | } | ||
76 | } | 71 | } |
77 | 72 | ||
78 | static void | 73 | static void |