]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-mips/compat.h
[ALSA] opl3 - Fix build errors
[linux-2.6-omap-h63xx.git] / include / asm-mips / compat.h
index 55a0152feb08c01246b8a58387a1f0eea0826670..568c76cdd9000aed94b2d7970bbfdb2f446d6973 100644 (file)
@@ -5,6 +5,7 @@
  */
 #include <linux/types.h>
 #include <asm/page.h>
+#include <asm/ptrace.h>
 
 #define COMPAT_USER_HZ 100
 
@@ -36,8 +37,10 @@ typedef s32          compat_key_t;
 
 typedef s32            compat_int_t;
 typedef s32            compat_long_t;
+typedef s64            compat_s64;
 typedef u32            compat_uint_t;
 typedef u32            compat_ulong_t;
+typedef u64            compat_u64;
 
 struct compat_timespec {
        compat_time_t   tv_sec;
@@ -131,7 +134,8 @@ typedef u32         compat_uptr_t;
 
 static inline void __user *compat_ptr(compat_uptr_t uptr)
 {
-       return (void __user *)(long)uptr;
+       /* cast to a __user pointer via "unsigned long" makes sparse happy */
+       return (void __user *)(unsigned long)(long)uptr;
 }
 
 static inline compat_uptr_t ptr_to_compat(void __user *uptr)