From d2829224619866daf336141b71550e223a198838 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Wed, 17 Jun 2009 16:28:38 -0700 Subject: lib: add lib/gcd.c This patch adds lib/gcd.c which contains a greatest common divider implementation taken from sound/core/pcm_timer.c Several usages of this new library function will be sent to subsystem maintainers. [akpm@linux-foundation.org: use swap() (pointed out by Joe)] [akpm@linux-foundation.org: just add gcd.o to obj-y, remove Kconfig changes] Signed-off-by: Florian Fainelli Cc: Sergei Shtylyov Cc: Takashi Iwai Cc: Simon Horman Cc: Julius Volz Cc: David S. Miller Cc: Patrick McHardy Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/gcd.h | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 include/linux/gcd.h (limited to 'include/linux/gcd.h') diff --git a/include/linux/gcd.h b/include/linux/gcd.h new file mode 100644 index 000000000000..69f5e8a01bad --- /dev/null +++ b/include/linux/gcd.h @@ -0,0 +1,8 @@ +#ifndef _GCD_H +#define _GCD_H + +#include + +unsigned long gcd(unsigned long a, unsigned long b) __attribute_const__; + +#endif /* _GCD_H */ -- cgit v1.2.3