summaryrefslogtreecommitdiffstats
path: root/sound/core/pcm_timer.c
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2009-12-21 16:36:10 -0800
committerTakashi Iwai <tiwai@suse.de>2009-12-22 08:24:35 +0100
commita9605391cfab2bf9a73e51faac5147622f73c6d5 (patch)
tree7dd120739a4793c990bb4a0b3dbbc4a9e1198386 /sound/core/pcm_timer.c
parentdb8cf334f66bdf1ba2b3d2f7128095fc9b7a6e2b (diff)
downloadlinux-a9605391cfab2bf9a73e51faac5147622f73c6d5.tar.bz2
ALSA: sound/core/pcm_timer.c: use lib/gcd.c
Make sound/core/pcm_timer.c use lib/gcd.c Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/pcm_timer.c')
-rw-r--r--sound/core/pcm_timer.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/sound/core/pcm_timer.c b/sound/core/pcm_timer.c
index ca8068b63d6c..b01d9481d632 100644
--- a/sound/core/pcm_timer.c
+++ b/sound/core/pcm_timer.c
@@ -20,6 +20,7 @@
*/
#include <linux/time.h>
+#include <linux/gcd.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/timer.h>
@@ -28,22 +29,6 @@
* 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)
{
unsigned long rate, mult, fsize, l, post;