Commit f847e236 authored by Florian Fainelli's avatar Florian Fainelli Committed by James Toy

Make sound/core/pcm_timer.c use lib/gcd.c

Signed-off-by: default avatarFlorian Fainelli <florian@openwrt.org>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Simon Horman <horms@verge.net.au>
Cc: Julius Volz <juliusv@google.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Patrick McHardy <kaber@trash.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 81892013
...@@ -5,6 +5,7 @@ config SND_TIMER ...@@ -5,6 +5,7 @@ config SND_TIMER
config SND_PCM config SND_PCM
tristate tristate
select SND_TIMER select SND_TIMER
select GCD
config SND_HWDEP config SND_HWDEP
tristate tristate
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
*/ */
#include <linux/time.h> #include <linux/time.h>
#include <linux/gcd.h>
#include <sound/core.h> #include <sound/core.h>
#include <sound/pcm.h> #include <sound/pcm.h>
#include <sound/timer.h> #include <sound/timer.h>
...@@ -28,22 +29,6 @@ ...@@ -28,22 +29,6 @@
* Timer functions * Timer functions
*/ */
/* Greatest common divisor */
static unsigned long gcd(unsigned long a, unsigned long b)
{
unsigned long r;
if (a < b) {
r = a;
a = b;
b = r;
}
while ((r = a % b) != 0) {
a = b;
b = r;
}
return b;
}
void snd_pcm_timer_resolution_change(struct snd_pcm_substream *substream) void snd_pcm_timer_resolution_change(struct snd_pcm_substream *substream)
{ {
unsigned long rate, mult, fsize, l, post; unsigned long rate, mult, fsize, l, post;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment