aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/drm_scatter.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-08-25 06:23:09 -0400
committerDave Airlie <airlied@optimus.(none)>2007-10-14 20:38:20 -0400
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 067d25daaf17..0c2188367e69 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)
62# define ScatterHandle(x) (unsigned int)(x) 62# define ScatterHandle(x) (unsigned int)(x)
63#endif 63#endif
64 64
65int drm_sg_alloc(struct inode *inode, struct file *filp, 65int drm_sg_alloc(struct inode *inode, struct drm_file *file_priv,
66 unsigned int cmd, unsigned long arg) 66 unsigned int cmd, unsigned long arg)
67{ 67{
68 struct drm_file *priv = filp->private_data; 68 struct drm_device *dev = file_priv->head->dev;
69 struct drm_device *dev = priv->head->dev;
70 struct drm_scatter_gather __user *argp = (void __user *)arg; 69 struct drm_scatter_gather __user *argp = (void __user *)arg;
71 struct drm_scatter_gather request; 70 struct drm_scatter_gather request;
72 struct drm_sg_mem *entry; 71 struct drm_sg_mem *entry;
@@ -198,11 +197,10 @@ int drm_sg_alloc(struct inode *inode, struct file *filp,
198 return -ENOMEM; 197 return -ENOMEM;
199} 198}
200 199
201int drm_sg_free(struct inode *inode, struct file *filp, 200int drm_sg_free(struct inode *inode, struct drm_file *file_priv,
202 unsigned int cmd, unsigned long arg) 201 unsigned int cmd, unsigned long arg)
203{ 202{
204 struct drm_file *priv = filp->private_data; 203 struct drm_device *dev = file_priv->head->dev;
205 struct drm_device *dev = priv->head->dev;
206 struct drm_scatter_gather request; 204 struct drm_scatter_gather request;
207 struct drm_sg_mem *entry; 205 struct drm_sg_mem *entry;
208 206