summaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/mga_state.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-08-25 20:23:09 +1000
committerDave Airlie <airlied@optimus.(none)>2007-10-15 10:38:20 +1000
commit6c340eac0285f3d62406d2d902d0e96fbf2a5dc0 (patch)
treea92039951cb7eaced306cfff2bad6af0ac5257ad /drivers/char/drm/mga_state.c
parent20caafa6ecb2487d9b223aa33e7cc704f912a758 (diff)
downloadop-kernel-dev-6c340eac0285f3d62406d2d902d0e96fbf2a5dc0.zip
op-kernel-dev-6c340eac0285f3d62406d2d902d0e96fbf2a5dc0.tar.gz
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/mga_state.c')
-rw-r--r--drivers/char/drm/mga_state.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/char/drm/mga_state.c b/drivers/char/drm/mga_state.c
index 4e98671..7481172 100644
--- a/drivers/char/drm/mga_state.c
+++ b/drivers/char/drm/mga_state.c
@@ -835,7 +835,7 @@ static int mga_dma_clear(DRM_IOCTL_ARGS)
drm_mga_sarea_t *sarea_priv = dev_priv->sarea_priv;
drm_mga_clear_t clear;
- LOCK_TEST_WITH_RETURN(dev, filp);
+ LOCK_TEST_WITH_RETURN(dev, file_priv);
DRM_COPY_FROM_USER_IOCTL(clear, (drm_mga_clear_t __user *) data,
sizeof(clear));
@@ -860,7 +860,7 @@ static int mga_dma_swap(DRM_IOCTL_ARGS)
drm_mga_private_t *dev_priv = dev->dev_private;
drm_mga_sarea_t *sarea_priv = dev_priv->sarea_priv;
- LOCK_TEST_WITH_RETURN(dev, filp);
+ LOCK_TEST_WITH_RETURN(dev, file_priv);
if (sarea_priv->nbox > MGA_NR_SAREA_CLIPRECTS)
sarea_priv->nbox = MGA_NR_SAREA_CLIPRECTS;
@@ -885,7 +885,7 @@ static int mga_dma_vertex(DRM_IOCTL_ARGS)
drm_mga_buf_priv_t *buf_priv;
drm_mga_vertex_t vertex;
- LOCK_TEST_WITH_RETURN(dev, filp);
+ LOCK_TEST_WITH_RETURN(dev, file_priv);
DRM_COPY_FROM_USER_IOCTL(vertex,
(drm_mga_vertex_t __user *) data,
@@ -925,7 +925,7 @@ static int mga_dma_indices(DRM_IOCTL_ARGS)
drm_mga_buf_priv_t *buf_priv;
drm_mga_indices_t indices;
- LOCK_TEST_WITH_RETURN(dev, filp);
+ LOCK_TEST_WITH_RETURN(dev, file_priv);
DRM_COPY_FROM_USER_IOCTL(indices,
(drm_mga_indices_t __user *) data,
@@ -966,7 +966,7 @@ static int mga_dma_iload(DRM_IOCTL_ARGS)
drm_mga_iload_t iload;
DRM_DEBUG("\n");
- LOCK_TEST_WITH_RETURN(dev, filp);
+ LOCK_TEST_WITH_RETURN(dev, file_priv);
DRM_COPY_FROM_USER_IOCTL(iload, (drm_mga_iload_t __user *) data,
sizeof(iload));
@@ -1008,7 +1008,7 @@ static int mga_dma_blit(DRM_IOCTL_ARGS)
drm_mga_blit_t blit;
DRM_DEBUG("\n");
- LOCK_TEST_WITH_RETURN(dev, filp);
+ LOCK_TEST_WITH_RETURN(dev, file_priv);
DRM_COPY_FROM_USER_IOCTL(blit, (drm_mga_blit_t __user *) data,
sizeof(blit));
OpenPOWER on IntegriCloud