summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/core/hrtimer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/core/hrtimer.c b/sound/core/hrtimer.c
index f845ecf7e172..656d9a9032dc 100644
--- a/sound/core/hrtimer.c
+++ b/sound/core/hrtimer.c
@@ -90,7 +90,7 @@ static int snd_hrtimer_start(struct snd_timer *t)
90 struct snd_hrtimer *stime = t->private_data; 90 struct snd_hrtimer *stime = t->private_data;
91 91
92 atomic_set(&stime->running, 0); 92 atomic_set(&stime->running, 0);
93 hrtimer_cancel(&stime->hrt); 93 hrtimer_try_to_cancel(&stime->hrt);
94 hrtimer_start(&stime->hrt, ns_to_ktime(t->sticks * resolution), 94 hrtimer_start(&stime->hrt, ns_to_ktime(t->sticks * resolution),
95 HRTIMER_MODE_REL); 95 HRTIMER_MODE_REL);
96 atomic_set(&stime->running, 1); 96 atomic_set(&stime->running, 1);
@@ -101,6 +101,7 @@ static int snd_hrtimer_stop(struct snd_timer *t)
101{ 101{
102 struct snd_hrtimer *stime = t->private_data; 102 struct snd_hrtimer *stime = t->private_data;
103 atomic_set(&stime->running, 0); 103 atomic_set(&stime->running, 0);
104 hrtimer_try_to_cancel(&stime->hrt);
104 return 0; 105 return 0;
105} 106}
106 107