aboutsummaryrefslogtreecommitdiffstats
path: root/sound/oss/sys_timer.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-03-23 08:14:02 -0400
committerTakashi Iwai <tiwai@suse.de>2015-03-23 08:14:02 -0400
commit3372dbdd8ca11f51be8c6a30b2bc79eb04c4a902 (patch)
treed4499bf5a5665b4820ffaf96bce55bf6b895195e /sound/oss/sys_timer.c
parentbc465aa9d045feb0e13b4a8f32cc33c1943f62d6 (diff)
parent967b1307b69b8ada8b331e01046ad1ef83742e99 (diff)
Merge branch 'for-next' into topic/hda-core
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)
50static void 50static void
51poll_def_tmr(unsigned long dummy) 51poll_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
78static void 73static void