patch-2.4.2 linux/include/asm-cris/div64.h

Next file: linux/include/asm-cris/dma.h
Previous file: linux/include/asm-cris/delay.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.1/linux/include/asm-cris/div64.h linux/include/asm-cris/div64.h
@@ -0,0 +1,16 @@
+#ifndef __ASM_CRIS_DIV64
+#define __ASM_CRIS_DIV64
+
+/* copy from asm-arm */
+
+/* We're not 64-bit, but... */
+#define do_div(n,base)						\
+({								\
+	int __res;						\
+	__res = ((unsigned long)n) % (unsigned int)base;	\
+	n = ((unsigned long)n) / (unsigned int)base;		\
+	__res;							\
+})
+
+#endif
+

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)