lib: add lib/gcd.c
authorFlorian Fainelli <florian@openwrt.org>
Wed, 17 Jun 2009 23:28:38 +0000 (16:28 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 18 Jun 2009 20:04:05 +0000 (13:04 -0700)
commitd2829224619866daf336141b71550e223a198838
tree59e12165ac9dea56a04f3b46ec098f4292f67481
parenteae9d2ba0cfc27a2ad9765f23efb98fb80d80234
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 <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: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/gcd.h [new file with mode: 0644]
lib/Makefile
lib/gcd.c [new file with mode: 0644]