Commit 5ebdce72 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Linus Torvalds

[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: default avatarChristoph Hellwig <hch@lst.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent f63776d0
...@@ -216,10 +216,10 @@ static int fbiogetputcmap(struct file *file, struct fb_info *info, ...@@ -216,10 +216,10 @@ static int fbiogetputcmap(struct file *file, struct fb_info *info,
ret |= put_user(compat_ptr(addr), &p->blue); ret |= put_user(compat_ptr(addr), &p->blue);
if (ret) if (ret)
return -EFAULT; return -EFAULT;
return info->fbops->fb_ioctl(file->f_dentry->d_inode, file, return info->fbops->fb_ioctl(info,
(cmd == FBIOPUTCMAP32) ? (cmd == FBIOPUTCMAP32) ?
FBIOPUTCMAP_SPARC : FBIOGETCMAP_SPARC, FBIOPUTCMAP_SPARC : FBIOGETCMAP_SPARC,
(unsigned long)p, info); (unsigned long)p);
} }
struct fbcursor32 { struct fbcursor32 {
...@@ -260,12 +260,11 @@ static int fbiogscursor(struct file *file, struct fb_info *info, ...@@ -260,12 +260,11 @@ static int fbiogscursor(struct file *file, struct fb_info *info,
ret |= put_user(compat_ptr(addr), &p->image); ret |= put_user(compat_ptr(addr), &p->image);
if (ret) if (ret)
return -EFAULT; return -EFAULT;
return info->fbops->fb_ioctl(file->f_dentry->d_inode, file, return info->fbops->fb_ioctl(info, FBIOSCURSOR, (unsigned long)p);
FBIOSCURSOR, (unsigned long)p, info);
} }
long sbusfb_compat_ioctl(struct file *file, unsigned int cmd, long sbusfb_compat_ioctl(struct fb_info *info, unsigned int cmd,
unsigned long arg, struct fb_info *info) unsigned long arg)
{ {
switch (cmd) { switch (cmd) {
case FBIOGTYPE: case FBIOGTYPE:
...@@ -278,14 +277,13 @@ long sbusfb_compat_ioctl(struct file *file, unsigned int cmd, ...@@ -278,14 +277,13 @@ long sbusfb_compat_ioctl(struct file *file, unsigned int cmd,
case FBIOSCURPOS: case FBIOSCURPOS:
case FBIOGCURPOS: case FBIOGCURPOS:
case FBIOGCURMAX: case FBIOGCURMAX:
return info->fbops->fb_ioctl(file->f_dentry->d_inode, return info->fbops->fb_ioctl(info, cmd, arg);
file, cmd, arg, info);
case FBIOPUTCMAP32: case FBIOPUTCMAP32:
return fbiogetputcmap(file, info, cmd, arg); return fbiogetputcmap(info, cmd, arg);
case FBIOGETCMAP32: case FBIOGETCMAP32:
return fbiogetputcmap(file, info, cmd, arg); return fbiogetputcmap(info, cmd, arg);
case FBIOSCURSOR32: case FBIOSCURSOR32:
return fbiogscursor(file, info, arg); return fbiogscursor(info, arg);
default: default:
return -ENOIOCTLCMD; return -ENOIOCTLCMD;
} }
......
...@@ -20,7 +20,7 @@ extern int sbusfb_mmap_helper(struct sbus_mmap_map *map, ...@@ -20,7 +20,7 @@ extern int sbusfb_mmap_helper(struct sbus_mmap_map *map,
int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg, int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg,
struct fb_info *info, struct fb_info *info,
int type, int fb_depth, unsigned long fb_size); int type, int fb_depth, unsigned long fb_size);
long sbusfb_compat_ioctl(struct file *file, unsigned int cmd, long sbusfb_compat_ioctl(struct fb_info *info, unsigned int cmd,
unsigned long arg, struct fb_info *info); unsigned long arg);
#endif /* _SBUSLIB_H */ #endif /* _SBUSLIB_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment