diff options
author | Eric Anholt <eric@anholt.net> | 2007-08-25 20:23:09 +1000 |
---|---|---|
committer | Dave Airlie <airlied@optimus.(none)> | 2007-10-15 10:38:20 +1000 |
commit | 6c340eac0285f3d62406d2d902d0e96fbf2a5dc0 (patch) | |
tree | a92039951cb7eaced306cfff2bad6af0ac5257ad /drivers/char/drm/drm_os_linux.h | |
parent | 20caafa6ecb2487d9b223aa33e7cc704f912a758 (diff) |
drm: 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 everyth
on Linux dereferenced filp to get file_priv anyway, while only the mmap ioct
went the other direction.
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/drm_os_linux.h')
-rw-r--r-- | drivers/char/drm/drm_os_linux.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/char/drm/drm_os_linux.h b/drivers/char/drm/drm_os_linux.h index 132c5580358..e87dc34a6fb 100644 --- a/drivers/char/drm/drm_os_linux.h +++ b/drivers/char/drm/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) @@ -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 ) \ |