aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2006-01-17 01:14:06 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-17 02:15:27 -0500
commit5ebdce726baf17eb66c5a1bf402ae6f161a082ed (patch)
treea8a5460f9096cf3f84975a634f377411d9ec0e11
parentf63776d0dccb6eb5f38beeac3eb9db735f7b5879 (diff)
[PATCH] fix up sbuslib for new fb_comapt_ioctl prototype
After ages my fb ioctl prototype cleanup finally got in. Unfortunately the patch are so old that the sbus compat_ioctl helper didn't exist back then, so it's not covered. This patch should fix that issue. Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: "David S. Miller" <davem@davemloft.net> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--drivers/video/sbuslib.c20
-rw-r--r--drivers/video/sbuslib.h4
2 files changed, 11 insertions, 13 deletions
diff --git a/drivers/video/sbuslib.c b/drivers/video/sbuslib.c
index 3a74a63dd4f2..55e6e2d60d3a 100644
--- a/drivers/video/sbuslib.c
+++ b/drivers/video/sbuslib.c
@@ -216,10 +216,10 @@ static int fbiogetputcmap(struct file *file, struct fb_info *info,
216 ret |= put_user(compat_ptr(addr), &p->blue); 216 ret |= put_user(compat_ptr(addr), &p->blue);
217 if (ret) 217 if (ret)
218 return -EFAULT; 218 return -EFAULT;
219 return info->fbops->fb_ioctl(file->f_dentry->d_inode, file, 219 return info->fbops->fb_ioctl(info,
220 (cmd == FBIOPUTCMAP32) ? 220 (cmd == FBIOPUTCMAP32) ?
221 FBIOPUTCMAP_SPARC : FBIOGETCMAP_SPARC, 221 FBIOPUTCMAP_SPARC : FBIOGETCMAP_SPARC,
222 (unsigned long)p, info); 222 (unsigned long)p);
223} 223}
224 224
225struct fbcursor32 { 225struct fbcursor32 {
@@ -260,12 +260,11 @@ static int fbiogscursor(struct file *file, struct fb_info *info,
260 ret |= put_user(compat_ptr(addr), &p->image); 260 ret |= put_user(compat_ptr(addr), &p->image);
261 if (ret) 261 if (ret)
262 return -EFAULT; 262 return -EFAULT;
263 return info->fbops->fb_ioctl(file->f_dentry->d_inode, file, 263 return info->fbops->fb_ioctl(info, FBIOSCURSOR, (unsigned long)p);
264 FBIOSCURSOR, (unsigned long)p, info);
265} 264}
266 265
267long sbusfb_compat_ioctl(struct file *file, unsigned int cmd, 266long sbusfb_compat_ioctl(struct fb_info *info, unsigned int cmd,
268 unsigned long arg, struct fb_info *info) 267 unsigned long arg)
269{ 268{
270 switch (cmd) { 269 switch (cmd) {
271 case FBIOGTYPE: 270 case FBIOGTYPE:
@@ -278,14 +277,13 @@ long sbusfb_compat_ioctl(struct file *file, unsigned int cmd,
278 case FBIOSCURPOS: 277 case FBIOSCURPOS:
279 case FBIOGCURPOS: 278 case FBIOGCURPOS:
280 case FBIOGCURMAX: 279 case FBIOGCURMAX:
281 return info->fbops->fb_ioctl(file->f_dentry->d_inode, 280 return info->fbops->fb_ioctl(info, cmd, arg);
282 file, cmd, arg, info);
283 case FBIOPUTCMAP32: 281 case FBIOPUTCMAP32:
284 return fbiogetputcmap(file, info, cmd, arg); 282 return fbiogetputcmap(info, cmd, arg);
285 case FBIOGETCMAP32: 283 case FBIOGETCMAP32:
286 return fbiogetputcmap(file, info, cmd, arg); 284 return fbiogetputcmap(info, cmd, arg);
287 case FBIOSCURSOR32: 285 case FBIOSCURSOR32:
288 return fbiogscursor(file, info, arg); 286 return fbiogscursor(info, arg);
289 default: 287 default:
290 return -ENOIOCTLCMD; 288 return -ENOIOCTLCMD;
291 } 289 }
diff --git a/drivers/video/sbuslib.h b/drivers/video/sbuslib.h
index b470e52ce9e2..f753939013ed 100644
--- a/drivers/video/sbuslib.h
+++ b/drivers/video/sbuslib.h
@@ -20,7 +20,7 @@ extern int sbusfb_mmap_helper(struct sbus_mmap_map *map,
20int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg, 20int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg,
21 struct fb_info *info, 21 struct fb_info *info,
22 int type, int fb_depth, unsigned long fb_size); 22 int type, int fb_depth, unsigned long fb_size);
23long sbusfb_compat_ioctl(struct file *file, unsigned int cmd, 23long sbusfb_compat_ioctl(struct fb_info *info, unsigned int cmd,
24 unsigned long arg, struct fb_info *info); 24 unsigned long arg);
25 25
26#endif /* _SBUSLIB_H */ 26#endif /* _SBUSLIB_H */