[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit
Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/ap/os/linux/linux-3.4.x/lib/gcd.c b/ap/os/linux/linux-3.4.x/lib/gcd.c
new file mode 100644
index 0000000..3657f12
--- /dev/null
+++ b/ap/os/linux/linux-3.4.x/lib/gcd.c
@@ -0,0 +1,21 @@
+#include <linux/kernel.h>
+#include <linux/gcd.h>
+#include <linux/export.h>
+
+/* Greatest common divisor */
+unsigned long gcd(unsigned long a, unsigned long b)
+{
+ unsigned long r;
+
+ if (a < b)
+ swap(a, b);
+
+ if (!b)
+ return a;
+ while ((r = a % b) != 0) {
+ a = b;
+ b = r;
+ }
+ return b;
+}
+EXPORT_SYMBOL_GPL(gcd);