X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=sound%2Fcore%2Fpcm_timer.c;h=ca8068b63d6c1bc413d16a2309d7d33fbe378893;hb=47312d2cfd9b769c1739738602c163c4c9814c7b;hp=23aa9a27e2158f8cd2173b6e66d12887a4432453;hpb=c1017a4cdb68ae5368fbc9ee42c77f1f5dca8916;p=safe%2Fjmp%2Flinux-2.6 diff --git a/sound/core/pcm_timer.c b/sound/core/pcm_timer.c index 23aa9a2..ca8068b 100644 --- a/sound/core/pcm_timer.c +++ b/sound/core/pcm_timer.c @@ -19,7 +19,6 @@ * */ -#include #include #include #include @@ -52,12 +51,14 @@ void snd_pcm_timer_resolution_change(struct snd_pcm_substream *substream) mult = 1000000000; rate = runtime->rate; - snd_assert(rate != 0, return); + if (snd_BUG_ON(!rate)) + return; l = gcd(mult, rate); mult /= l; rate /= l; fsize = runtime->period_size; - snd_assert(fsize != 0, return); + if (snd_BUG_ON(!fsize)) + return; l = gcd(rate, fsize); rate /= l; fsize /= l; @@ -84,25 +85,19 @@ static unsigned long snd_pcm_timer_resolution(struct snd_timer * timer) static int snd_pcm_timer_start(struct snd_timer * timer) { - unsigned long flags; struct snd_pcm_substream *substream; substream = snd_timer_chip(timer); - spin_lock_irqsave(&substream->timer_lock, flags); substream->timer_running = 1; - spin_unlock_irqrestore(&substream->timer_lock, flags); return 0; } static int snd_pcm_timer_stop(struct snd_timer * timer) { - unsigned long flags; struct snd_pcm_substream *substream; substream = snd_timer_chip(timer); - spin_lock_irqsave(&substream->timer_lock, flags); substream->timer_running = 0; - spin_unlock_irqrestore(&substream->timer_lock, flags); return 0; }