X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=sound%2Foss%2Fsys_timer.c;h=2226dda0eff0d9e2daf3f907877f20930f4f57ff;hb=8f49309a261dbe9b5217908e0e8ee8da7f148695;hp=9f039831114c2f75e11789e061dd505933f87beb;hpb=53279f36dccffc26ff536003fd6bb97cc21c3b82;p=firefly-linux-kernel-4.4.55.git 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