drm: Replace filp in ioctl arguments with drm_file *file_priv.
[cascardo/linux.git] / drivers / char / drm / drm_os_linux.h
index 132c558..e87dc34 100644 (file)
@@ -6,10 +6,8 @@
 #include <linux/interrupt.h>   /* For task queue support */
 #include <linux/delay.h>
 
-/** File pointer type */
-#define DRMFILE                         struct file *
 /** Ioctl arguments */
-#define DRM_IOCTL_ARGS                 struct inode *inode, struct file *filp, unsigned int cmd, unsigned long data
+#define DRM_IOCTL_ARGS                 struct inode *inode, struct drm_file *file_priv, unsigned int cmd, unsigned long data
 /** Current process ID */
 #define DRM_CURRENTPID                 current->pid
 #define DRM_SUSER(p)                   capable(CAP_SYS_ADMIN)
@@ -33,8 +31,7 @@
 /** Read/write memory barrier */
 #define DRM_MEMORYBARRIER()            mb()
 /** DRM device local declaration */
-#define DRM_DEVICE     struct drm_file *priv   = filp->private_data; \
-                       struct drm_device *dev  = priv->head->dev
+#define DRM_DEVICE     struct drm_device *dev  = file_priv->head->dev
 
 /** IRQ handler arguments and return type and values */
 #define DRM_IRQ_ARGS           int irq, void *arg
@@ -93,8 +90,6 @@ static __inline__ int mtrr_del(int reg, unsigned long base, unsigned long size)
 #define DRM_GET_USER_UNCHECKED(val, uaddr)             \
        __get_user(val, uaddr)
 
-#define DRM_GET_PRIV_WITH_RETURN(_priv, _filp) _priv = _filp->private_data
-
 #define DRM_HZ HZ
 
 #define DRM_WAIT_ON( ret, queue, timeout, condition )          \