From 6c340eac0285f3d62406d2d902d0e96fbf2a5dc0 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Sat, 25 Aug 2007 20:23:09 +1000 Subject: 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 --- drivers/char/drm/i830_irq.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'drivers/char/drm/i830_irq.c') diff --git a/drivers/char/drm/i830_irq.c b/drivers/char/drm/i830_irq.c index a1b5c63c3c3e..9c28939e2db3 100644 --- a/drivers/char/drm/i830_irq.c +++ b/drivers/char/drm/i830_irq.c @@ -114,16 +114,15 @@ static int i830_wait_irq(struct drm_device * dev, int irq_nr) /* Needs the lock as it touches the ring. */ -int i830_irq_emit(struct inode *inode, struct file *filp, unsigned int cmd, - unsigned long arg) +int i830_irq_emit(struct inode *inode, struct drm_file *file_priv, + unsigned int cmd, unsigned long arg) { - struct drm_file *priv = filp->private_data; - struct drm_device *dev = priv->head->dev; + struct drm_device *dev = file_priv->head->dev; drm_i830_private_t *dev_priv = dev->dev_private; drm_i830_irq_emit_t emit; int result; - LOCK_TEST_WITH_RETURN(dev, filp); + LOCK_TEST_WITH_RETURN(dev, file_priv); if (!dev_priv) { DRM_ERROR("%s called with no initialization\n", __FUNCTION__); @@ -146,11 +145,10 @@ int i830_irq_emit(struct inode *inode, struct file *filp, unsigned int cmd, /* Doesn't need the hardware lock. */ -int i830_irq_wait(struct inode *inode, struct file *filp, unsigned int cmd, - unsigned long arg) +int i830_irq_wait(struct inode *inode, struct drm_file *file_priv, + unsigned int cmd, unsigned long arg) { - struct drm_file *priv = filp->private_data; - struct drm_device *dev = priv->head->dev; + struct drm_device *dev = file_priv->head->dev; drm_i830_private_t *dev_priv = dev->dev_private; drm_i830_irq_wait_t irqwait; -- cgit v1.2.3