drm: Replace filp in ioctl arguments with drm_file *file_priv.
[cascardo/linux.git] / drivers / char / drm / drm_scatter.c
index 06ef7dd..0c21883 100644 (file)
@@ -36,7 +36,7 @@
 
 #define DEBUG_SCATTER 0
 
-void drm_sg_cleanup(drm_sg_mem_t * entry)
+void drm_sg_cleanup(struct drm_sg_mem * entry)
 {
        struct page *page;
        int i;
@@ -62,14 +62,13 @@ void drm_sg_cleanup(drm_sg_mem_t * entry)
 # define ScatterHandle(x) (unsigned int)(x)
 #endif
 
-int drm_sg_alloc(struct inode *inode, struct file *filp,
+int drm_sg_alloc(struct inode *inode, struct drm_file *file_priv,
                 unsigned int cmd, unsigned long arg)
 {
-       drm_file_t *priv = filp->private_data;
-       drm_device_t *dev = priv->head->dev;
-       drm_scatter_gather_t __user *argp = (void __user *)arg;
-       drm_scatter_gather_t request;
-       drm_sg_mem_t *entry;
+       struct drm_device *dev = file_priv->head->dev;
+       struct drm_scatter_gather __user *argp = (void __user *)arg;
+       struct drm_scatter_gather request;
+       struct drm_sg_mem *entry;
        unsigned long pages, i, j;
 
        DRM_DEBUG("%s\n", __FUNCTION__);
@@ -198,19 +197,18 @@ int drm_sg_alloc(struct inode *inode, struct file *filp,
        return -ENOMEM;
 }
 
-int drm_sg_free(struct inode *inode, struct file *filp,
+int drm_sg_free(struct inode *inode, struct drm_file *file_priv,
                unsigned int cmd, unsigned long arg)
 {
-       drm_file_t *priv = filp->private_data;
-       drm_device_t *dev = priv->head->dev;
-       drm_scatter_gather_t request;
-       drm_sg_mem_t *entry;
+       struct drm_device *dev = file_priv->head->dev;
+       struct drm_scatter_gather request;
+       struct drm_sg_mem *entry;
 
        if (!drm_core_check_feature(dev, DRIVER_SG))
                return -EINVAL;
 
        if (copy_from_user(&request,
-                          (drm_scatter_gather_t __user *) arg,
+                          (struct drm_scatter_gather __user *) arg,
                           sizeof(request)))
                return -EFAULT;