aboutsummaryrefslogtreecommitdiff
path: root/linux-core/drm_os_linux.h
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-07-20 06:39:25 -0700
committerEric Anholt <eric@anholt.net>2007-07-20 13:39:45 -0700
commitc1119b1b092527fbb6950d0b5e51e076ddb00f29 (patch)
tree1d4b0f26e40d572e4c92eb4ebde88e60b9b137e5 /linux-core/drm_os_linux.h
parent35de4868361ce1fb515cf33f27e6be4c59b07f89 (diff)
Replace filp in ioctl arguments with drm_file *file_priv.
As a fallout, replace filp storage with file_priv storage for "unique identifier of a client" all over the DRM. There is a 1:1 mapping, so this should be a noop. This could be a minor performance improvement, as everything on Linux dereferenced filp to get file_priv anyway, while only the mmap ioctls went the other direction.
Diffstat (limited to 'linux-core/drm_os_linux.h')
-rw-r--r--linux-core/drm_os_linux.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/linux-core/drm_os_linux.h b/linux-core/drm_os_linux.h
index 3d2ad779..3f143833 100644
--- a/linux-core/drm_os_linux.h
+++ b/linux-core/drm_os_linux.h
@@ -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)
@@ -51,8 +49,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
@@ -116,8 +113,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 ) \