summaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/drm_scatter.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/drm_scatter.c
parent20caafa6ecb2487d9b223aa33e7cc704f912a758 (diff)
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/drm_scatter.c')
-rw-r--r--drivers/char/drm/drm_scatter.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/char/drm/drm_scatter.c b/drivers/char/drm/drm_scatter.c
index 067d25daaf1..0c2188367e6 100644
--- a/drivers/char/drm/drm_scatter.c
+++ b/drivers/char/drm/drm_scatter.c
@@ -62,11 +62,10 @@ void drm_sg_cleanup(struct drm_sg_mem * 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)
{
- struct drm_file *priv = filp->private_data;
- struct drm_device *dev = priv->head->dev;
+ 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;
@@ -198,11 +197,10 @@ 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)
{
- struct drm_file *priv = filp->private_data;
- struct drm_device *dev = priv->head->dev;
+ struct drm_device *dev = file_priv->head->dev;
struct drm_scatter_gather request;
struct drm_sg_mem *entry;