diff options
Diffstat (limited to 'drivers/video/sbuslib.c')
-rw-r--r-- | drivers/video/sbuslib.c | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/drivers/video/sbuslib.c b/drivers/video/sbuslib.c index 3a74a63dd4f2..a4d7cc51ce0b 100644 --- a/drivers/video/sbuslib.c +++ b/drivers/video/sbuslib.c | |||
@@ -199,8 +199,7 @@ struct fbcmap32 { | |||
199 | #define FBIOPUTCMAP32 _IOW('F', 3, struct fbcmap32) | 199 | #define FBIOPUTCMAP32 _IOW('F', 3, struct fbcmap32) |
200 | #define FBIOGETCMAP32 _IOW('F', 4, struct fbcmap32) | 200 | #define FBIOGETCMAP32 _IOW('F', 4, struct fbcmap32) |
201 | 201 | ||
202 | static int fbiogetputcmap(struct file *file, struct fb_info *info, | 202 | static int fbiogetputcmap(struct fb_info *info, unsigned int cmd, unsigned long arg) |
203 | unsigned int cmd, unsigned long arg) | ||
204 | { | 203 | { |
205 | struct fbcmap32 __user *argp = (void __user *)arg; | 204 | struct fbcmap32 __user *argp = (void __user *)arg; |
206 | struct fbcmap __user *p = compat_alloc_user_space(sizeof(*p)); | 205 | struct fbcmap __user *p = compat_alloc_user_space(sizeof(*p)); |
@@ -216,10 +215,10 @@ static int fbiogetputcmap(struct file *file, struct fb_info *info, | |||
216 | ret |= put_user(compat_ptr(addr), &p->blue); | 215 | ret |= put_user(compat_ptr(addr), &p->blue); |
217 | if (ret) | 216 | if (ret) |
218 | return -EFAULT; | 217 | return -EFAULT; |
219 | return info->fbops->fb_ioctl(file->f_dentry->d_inode, file, | 218 | return info->fbops->fb_ioctl(info, |
220 | (cmd == FBIOPUTCMAP32) ? | 219 | (cmd == FBIOPUTCMAP32) ? |
221 | FBIOPUTCMAP_SPARC : FBIOGETCMAP_SPARC, | 220 | FBIOPUTCMAP_SPARC : FBIOGETCMAP_SPARC, |
222 | (unsigned long)p, info); | 221 | (unsigned long)p); |
223 | } | 222 | } |
224 | 223 | ||
225 | struct fbcursor32 { | 224 | struct fbcursor32 { |
@@ -236,8 +235,7 @@ struct fbcursor32 { | |||
236 | #define FBIOSCURSOR32 _IOW('F', 24, struct fbcursor32) | 235 | #define FBIOSCURSOR32 _IOW('F', 24, struct fbcursor32) |
237 | #define FBIOGCURSOR32 _IOW('F', 25, struct fbcursor32) | 236 | #define FBIOGCURSOR32 _IOW('F', 25, struct fbcursor32) |
238 | 237 | ||
239 | static int fbiogscursor(struct file *file, struct fb_info *info, | 238 | static int fbiogscursor(struct fb_info *info, unsigned long arg) |
240 | unsigned long arg) | ||
241 | { | 239 | { |
242 | struct fbcursor __user *p = compat_alloc_user_space(sizeof(*p)); | 240 | struct fbcursor __user *p = compat_alloc_user_space(sizeof(*p)); |
243 | struct fbcursor32 __user *argp = (void __user *)arg; | 241 | struct fbcursor32 __user *argp = (void __user *)arg; |
@@ -260,12 +258,10 @@ static int fbiogscursor(struct file *file, struct fb_info *info, | |||
260 | ret |= put_user(compat_ptr(addr), &p->image); | 258 | ret |= put_user(compat_ptr(addr), &p->image); |
261 | if (ret) | 259 | if (ret) |
262 | return -EFAULT; | 260 | return -EFAULT; |
263 | return info->fbops->fb_ioctl(file->f_dentry->d_inode, file, | 261 | return info->fbops->fb_ioctl(info, FBIOSCURSOR, (unsigned long)p); |
264 | FBIOSCURSOR, (unsigned long)p, info); | ||
265 | } | 262 | } |
266 | 263 | ||
267 | long sbusfb_compat_ioctl(struct file *file, unsigned int cmd, | 264 | int sbusfb_compat_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg) |
268 | unsigned long arg, struct fb_info *info) | ||
269 | { | 265 | { |
270 | switch (cmd) { | 266 | switch (cmd) { |
271 | case FBIOGTYPE: | 267 | case FBIOGTYPE: |
@@ -278,14 +274,13 @@ long sbusfb_compat_ioctl(struct file *file, unsigned int cmd, | |||
278 | case FBIOSCURPOS: | 274 | case FBIOSCURPOS: |
279 | case FBIOGCURPOS: | 275 | case FBIOGCURPOS: |
280 | case FBIOGCURMAX: | 276 | case FBIOGCURMAX: |
281 | return info->fbops->fb_ioctl(file->f_dentry->d_inode, | 277 | return info->fbops->fb_ioctl(info, cmd, arg); |
282 | file, cmd, arg, info); | ||
283 | case FBIOPUTCMAP32: | 278 | case FBIOPUTCMAP32: |
284 | return fbiogetputcmap(file, info, cmd, arg); | 279 | return fbiogetputcmap(info, cmd, arg); |
285 | case FBIOGETCMAP32: | 280 | case FBIOGETCMAP32: |
286 | return fbiogetputcmap(file, info, cmd, arg); | 281 | return fbiogetputcmap(info, cmd, arg); |
287 | case FBIOSCURSOR32: | 282 | case FBIOSCURSOR32: |
288 | return fbiogscursor(file, info, arg); | 283 | return fbiogscursor(info, arg); |
289 | default: | 284 | default: |
290 | return -ENOIOCTLCMD; | 285 | return -ENOIOCTLCMD; |
291 | } | 286 | } |