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.

[[email protected]: use swap() (pointed out by Joe)]
[[email protected]: just add gcd.o to obj-y, remove Kconfig changes]
Signed-off-by: Florian Fainelli <[email protected]>
Cc: Sergei Shtylyov <[email protected]>
Cc: Takashi Iwai <[email protected]>
Cc: Simon Horman <[email protected]>
Cc: Julius Volz <[email protected]>
Cc: David S. Miller <[email protected]>
Cc: Patrick McHardy <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Florian Fainelli 2009-06-17 16:28:38 -07:00 • committed by Linus Torvalds
commit d282922461
3 changed files with 27 additions and 1 deletions

View file

@ -21,7 +21,7 @@ lib-y += kobject.o kref.o klist.o
obj-y += bcd.o div64.o sort.o parser.o halfmd4.o debug_locks.o random32.o \
bust_spinlocks.o hexdump.o kasprintf.o bitmap.o scatterlist.o \
string_helpers.o
string_helpers.o gcd.o
ifeq ($(CONFIG_DEBUG_KOBJECT),y)
CFLAGS_kobject.o += -DDEBUG