diff options
author | Eric Anholt <eric@anholt.net> | 2007-08-25 12:23:09 +0200 |
---|---|---|
committer | Dave Airlie <airlied@optimus.(none)> | 2007-10-15 02:38:20 +0200 |
commit | 6c340eac0285f3d62406d2d902d0e96fbf2a5dc0 (patch) | |
tree | a92039951cb7eaced306cfff2bad6af0ac5257ad /drivers/char/drm/mga_state.c | |
parent | drm: Remove DRM_ERR OS macro. (diff) | |
download | linux-6c340eac0285f3d62406d2d902d0e96fbf2a5dc0.tar.xz linux-6c340eac0285f3d62406d2d902d0e96fbf2a5dc0.zip |
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.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/char/drm/mga_state.c b/drivers/char/drm/mga_state.c index 4e9867161170..74811727595a 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)); |