mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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:
parent
eae9d2ba0c
commit
d282922461
3 changed files with 27 additions and 1 deletions
8
include/linux/gcd.h
Normal file
8
include/linux/gcd.h
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#ifndef _GCD_H
|
||||
#define _GCD_H
|
||||
|
||||
#include <linux/compiler.h>
|
||||
|
||||
unsigned long gcd(unsigned long a, unsigned long b) __attribute_const__;
|
||||
|
||||
#endif /* _GCD_H */
|
||||
Loading…
Reference in a new issue