pandora: defconfig: update
[pandora-kernel.git] / sound / core / hrtimer.c
index b8b31c4..834fa60 100644 (file)
@@ -90,7 +90,7 @@ static int snd_hrtimer_start(struct snd_timer *t)
        struct snd_hrtimer *stime = t->private_data;
 
        atomic_set(&stime->running, 0);
-       hrtimer_cancel(&stime->hrt);
+       hrtimer_try_to_cancel(&stime->hrt);
        hrtimer_start(&stime->hrt, ns_to_ktime(t->sticks * resolution),
                      HRTIMER_MODE_REL);
        atomic_set(&stime->running, 1);
@@ -101,6 +101,7 @@ static int snd_hrtimer_stop(struct snd_timer *t)
 {
        struct snd_hrtimer *stime = t->private_data;
        atomic_set(&stime->running, 0);
+       hrtimer_try_to_cancel(&stime->hrt);
        return 0;
 }
 
@@ -144,6 +145,7 @@ static int __init snd_hrtimer_init(void)
        timer->hw = hrtimer_hw;
        timer->hw.resolution = resolution;
        timer->hw.ticks = NANO_SEC / resolution;
+       timer->max_instances = 100; /* lower the limit */
 
        err = snd_timer_global_register(timer);
        if (err < 0) {