Merge branch 'linus' into core/rodata
[linux-2.6-block.git] / drivers / char / drm / drm_os_linux.h
index 114e54e0f61bc8d5f0cc1c7d85d2c72cfa1f9750..8dbd2572b7c3bc558bee3f6f3b18b1989c69e5fb 100644 (file)
@@ -7,7 +7,7 @@
 #include <linux/delay.h>
 
 /** Current process ID */
-#define DRM_CURRENTPID                 current->pid
+#define DRM_CURRENTPID                 task_pid_nr(current)
 #define DRM_SUSER(p)                   capable(CAP_SYS_ADMIN)
 #define DRM_UDELAY(d)                  udelay(d)
 /** Read a byte from a MMIO region */
@@ -62,14 +62,6 @@ static __inline__ int mtrr_del(int reg, unsigned long base, unsigned long size)
 
 #endif
 
-/** For data going into the kernel through the ioctl argument */
-#define DRM_COPY_FROM_USER_IOCTL(arg1, arg2, arg3)     \
-       if ( copy_from_user(&arg1, arg2, arg3) )        \
-               return -EFAULT
-/** For data going from the kernel through the ioctl argument */
-#define DRM_COPY_TO_USER_IOCTL(arg1, arg2, arg3)       \
-       if ( copy_to_user(arg1, &arg2, arg3) )          \
-               return -EFAULT
 /** Other copying of data to kernel space */
 #define DRM_COPY_FROM_USER(arg1, arg2, arg3)           \
        copy_from_user(arg1, arg2, arg3)
@@ -77,9 +69,9 @@ static __inline__ int mtrr_del(int reg, unsigned long base, unsigned long size)
 #define DRM_COPY_TO_USER(arg1, arg2, arg3)             \
        copy_to_user(arg1, arg2, arg3)
 /* Macros for copyfrom user, but checking readability only once */
-#define DRM_VERIFYAREA_READ( uaddr, size )             \
+#define DRM_VERIFYAREA_READ( uaddr, size )             \
        (access_ok( VERIFY_READ, uaddr, size ) ? 0 : -EFAULT)
-#define DRM_COPY_FROM_USER_UNCHECKED(arg1, arg2, arg3)         \
+#define DRM_COPY_FROM_USER_UNCHECKED(arg1, arg2, arg3) \
        __copy_from_user(arg1, arg2, arg3)
 #define DRM_COPY_TO_USER_UNCHECKED(arg1, arg2, arg3)   \
        __copy_to_user(arg1, arg2, arg3)