summaryrefslogtreecommitdiff
path: root/linux/drmP.h
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drmP.h')
-rw-r--r--linux/drmP.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/linux/drmP.h b/linux/drmP.h
index 6be90c51..46e08e05 100644
--- a/linux/drmP.h
+++ b/linux/drmP.h
@@ -59,6 +59,15 @@
#include <asm/io.h>
#include <asm/mman.h>
#include <asm/uaccess.h>
+
+#ifndef copy_to_user_ret
+#define copy_to_user_ret(to,from,n,retval) ({ if (copy_to_user(to,from,n)) return retval; })
+#endif
+
+#ifndef copy_from_user_ret
+#define copy_from_user_ret(to,from,n,retval) ({ if (copy_from_user(to,from,n)) return retval; })
+#endif
+
#ifdef CONFIG_MTRR
#include <asm/mtrr.h>
#endif