[<prev] [next>] [day] [month] [year] [list]
Message-Id: <200906041615.46679.florian@openwrt.org>
Date: Thu, 4 Jun 2009 16:15:46 +0200
From: Florian Fainelli <florian@...nwrt.org>
To: "Linux-MIPS" <linux-mips@...ux-mips.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Takashi Iwai <tiwai@...e.de>,
Ralf Baechle <ralf@...ux-mips.org>,
linux-kernel@...r.kernel.org
Subject: [PATCH 2/8] sound/core/pcm_timer.c: use lib/gcd.c
This patch makes sound/core/pcm_timer.c use lib/gcd.c
Signed-off-by: Florian Fainelli <florian@...nwrt.org>
---
diff --git a/sound/core/Kconfig b/sound/core/Kconfig
index 7bbdda0..0ae2485 100644
--- a/sound/core/Kconfig
+++ b/sound/core/Kconfig
@@ -5,6 +5,7 @@ config SND_TIMER
config SND_PCM
tristate
select SND_TIMER
+ select GCD
config SND_HWDEP
tristate
diff --git a/sound/core/pcm_timer.c b/sound/core/pcm_timer.c
index ca8068b..b01d948 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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists