Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Florian Fainelli and committed by
Takashi Iwai
a9605391 db8cf334

+2 -16
+1
sound/core/Kconfig
··· 5 5 config SND_PCM 6 6 tristate 7 7 select SND_TIMER 8 + select GCD 8 9 9 10 config SND_HWDEP 10 11 tristate
+1 -16
sound/core/pcm_timer.c
··· 20 20 */ 21 21 22 22 #include <linux/time.h> 23 + #include <linux/gcd.h> 23 24 #include <sound/core.h> 24 25 #include <sound/pcm.h> 25 26 #include <sound/timer.h> ··· 28 27 /* 29 28 * Timer functions 30 29 */ 31 - 32 - /* Greatest common divisor */ 33 - static unsigned long gcd(unsigned long a, unsigned long b) 34 - { 35 - unsigned long r; 36 - if (a < b) { 37 - r = a; 38 - a = b; 39 - b = r; 40 - } 41 - while ((r = a % b) != 0) { 42 - a = b; 43 - b = r; 44 - } 45 - return b; 46 - } 47 30 48 31 void snd_pcm_timer_resolution_change(struct snd_pcm_substream *substream) 49 32 {