summaryrefslogtreecommitdiff
path: root/shared-core/mga_dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'shared-core/mga_dma.c')
-rw-r--r--shared-core/mga_dma.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/shared-core/mga_dma.c b/shared-core/mga_dma.c
index cbcb6380..429ffa54 100644
--- a/shared-core/mga_dma.c
+++ b/shared-core/mga_dma.c
@@ -1016,7 +1016,7 @@ int mga_dma_init(DRM_IOCTL_ARGS)
drm_mga_init_t init;
int err;
- LOCK_TEST_WITH_RETURN(dev, filp);
+ LOCK_TEST_WITH_RETURN(dev, file_priv);
DRM_COPY_FROM_USER_IOCTL(init, (drm_mga_init_t __user *) data,
sizeof(init));
@@ -1045,7 +1045,7 @@ int mga_dma_flush(DRM_IOCTL_ARGS)
drm_mga_private_t *dev_priv = (drm_mga_private_t *) dev->dev_private;
struct drm_lock lock;
- LOCK_TEST_WITH_RETURN(dev, filp);
+ LOCK_TEST_WITH_RETURN(dev, file_priv);
DRM_COPY_FROM_USER_IOCTL(lock, (struct drm_lock __user *) data,
sizeof(lock));
@@ -1080,7 +1080,7 @@ int mga_dma_reset(DRM_IOCTL_ARGS)
DRM_DEVICE;
drm_mga_private_t *dev_priv = (drm_mga_private_t *) dev->dev_private;
- LOCK_TEST_WITH_RETURN(dev, filp);
+ LOCK_TEST_WITH_RETURN(dev, file_priv);
return mga_do_dma_reset(dev_priv);
}
@@ -1089,7 +1089,8 @@ int mga_dma_reset(DRM_IOCTL_ARGS)
* DMA buffer management
*/
-static int mga_dma_get_buffers(DRMFILE filp, struct drm_device * dev, struct drm_dma * d)
+static int mga_dma_get_buffers(struct drm_device * dev,
+ struct drm_file *file_priv, struct drm_dma * d)
{
struct drm_buf *buf;
int i;
@@ -1099,7 +1100,7 @@ static int mga_dma_get_buffers(DRMFILE filp, struct drm_device * dev, struct drm
if (!buf)
return -EAGAIN;
- buf->filp = filp;
+ buf->file_priv = file_priv;
if (DRM_COPY_TO_USER(&d->request_indices[i],
&buf->idx, sizeof(buf->idx)))
@@ -1122,7 +1123,7 @@ int mga_dma_buffers(DRM_IOCTL_ARGS)
struct drm_dma d;
int ret = 0;
- LOCK_TEST_WITH_RETURN(dev, filp);
+ LOCK_TEST_WITH_RETURN(dev, file_priv);
DRM_COPY_FROM_USER_IOCTL(d, argp, sizeof(d));
@@ -1147,7 +1148,7 @@ int mga_dma_buffers(DRM_IOCTL_ARGS)
d.granted_count = 0;
if (d.request_count) {
- ret = mga_dma_get_buffers(filp, dev, &d);
+ ret = mga_dma_get_buffers(dev, file_priv, &d);
}
DRM_COPY_TO_USER_IOCTL(argp, d, sizeof(d));