sound: sys_timer: indent poll_def_tmr() correctly
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 25 Feb 2015 13:27:10 +0000 (16:27 +0300)
committerTakashi Iwai <tiwai@suse.de>
Wed, 25 Feb 2015 19:08:07 +0000 (20:08 +0100)
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>
sound/oss/sys_timer.c

index 9f039831114c2f75e11789e061dd505933f87beb..2226dda0eff0d9e2daf3f907877f20930f4f57ff 100644 (file)
@@ -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