diff options
Diffstat (limited to 'drivers/gpu/drm/r128/r128_ioc32.c')
-rw-r--r-- | drivers/gpu/drm/r128/r128_ioc32.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/drivers/gpu/drm/r128/r128_ioc32.c b/drivers/gpu/drm/r128/r128_ioc32.c index d3cb676eee84..51c99fc4dd38 100644 --- a/drivers/gpu/drm/r128/r128_ioc32.c +++ b/drivers/gpu/drm/r128/r128_ioc32.c | |||
@@ -95,8 +95,7 @@ static int compat_r128_init(struct file *file, unsigned int cmd, | |||
95 | &init->agp_textures_offset)) | 95 | &init->agp_textures_offset)) |
96 | return -EFAULT; | 96 | return -EFAULT; |
97 | 97 | ||
98 | return drm_ioctl(file->f_path.dentry->d_inode, file, | 98 | return drm_ioctl(file, DRM_IOCTL_R128_INIT, (unsigned long)init); |
99 | DRM_IOCTL_R128_INIT, (unsigned long)init); | ||
100 | } | 99 | } |
101 | 100 | ||
102 | typedef struct drm_r128_depth32 { | 101 | typedef struct drm_r128_depth32 { |
@@ -129,8 +128,7 @@ static int compat_r128_depth(struct file *file, unsigned int cmd, | |||
129 | &depth->mask)) | 128 | &depth->mask)) |
130 | return -EFAULT; | 129 | return -EFAULT; |
131 | 130 | ||
132 | return drm_ioctl(file->f_path.dentry->d_inode, file, | 131 | return drm_ioctl(file, DRM_IOCTL_R128_DEPTH, (unsigned long)depth); |
133 | DRM_IOCTL_R128_DEPTH, (unsigned long)depth); | ||
134 | 132 | ||
135 | } | 133 | } |
136 | 134 | ||
@@ -153,8 +151,7 @@ static int compat_r128_stipple(struct file *file, unsigned int cmd, | |||
153 | &stipple->mask)) | 151 | &stipple->mask)) |
154 | return -EFAULT; | 152 | return -EFAULT; |
155 | 153 | ||
156 | return drm_ioctl(file->f_path.dentry->d_inode, file, | 154 | return drm_ioctl(file, DRM_IOCTL_R128_STIPPLE, (unsigned long)stipple); |
157 | DRM_IOCTL_R128_STIPPLE, (unsigned long)stipple); | ||
158 | } | 155 | } |
159 | 156 | ||
160 | typedef struct drm_r128_getparam32 { | 157 | typedef struct drm_r128_getparam32 { |
@@ -178,8 +175,7 @@ static int compat_r128_getparam(struct file *file, unsigned int cmd, | |||
178 | &getparam->value)) | 175 | &getparam->value)) |
179 | return -EFAULT; | 176 | return -EFAULT; |
180 | 177 | ||
181 | return drm_ioctl(file->f_path.dentry->d_inode, file, | 178 | return drm_ioctl(file, DRM_IOCTL_R128_GETPARAM, (unsigned long)getparam); |
182 | DRM_IOCTL_R128_GETPARAM, (unsigned long)getparam); | ||
183 | } | 179 | } |
184 | 180 | ||
185 | drm_ioctl_compat_t *r128_compat_ioctls[] = { | 181 | drm_ioctl_compat_t *r128_compat_ioctls[] = { |
@@ -210,12 +206,10 @@ long r128_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | |||
210 | if (nr < DRM_COMMAND_BASE + DRM_ARRAY_SIZE(r128_compat_ioctls)) | 206 | if (nr < DRM_COMMAND_BASE + DRM_ARRAY_SIZE(r128_compat_ioctls)) |
211 | fn = r128_compat_ioctls[nr - DRM_COMMAND_BASE]; | 207 | fn = r128_compat_ioctls[nr - DRM_COMMAND_BASE]; |
212 | 208 | ||
213 | lock_kernel(); /* XXX for now */ | ||
214 | if (fn != NULL) | 209 | if (fn != NULL) |
215 | ret = (*fn) (filp, cmd, arg); | 210 | ret = (*fn) (filp, cmd, arg); |
216 | else | 211 | else |
217 | ret = drm_ioctl(filp->f_path.dentry->d_inode, filp, cmd, arg); | 212 | ret = drm_ioctl(filp, cmd, arg); |
218 | unlock_kernel(); | ||
219 | 213 | ||
220 | return ret; | 214 | return ret; |
221 | } | 215 | } |