Commit 9a469037 authored by Al Viro's avatar Al Viro

fb_get_fscreeninfo(): don't bother with do_fb_ioctl()

it's easier to do the right thing directly
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent bcfe8ad8
...@@ -1331,22 +1331,13 @@ static int do_fscreeninfo_to_user(struct fb_fix_screeninfo *fix, ...@@ -1331,22 +1331,13 @@ static int do_fscreeninfo_to_user(struct fb_fix_screeninfo *fix,
static int fb_get_fscreeninfo(struct fb_info *info, unsigned int cmd, static int fb_get_fscreeninfo(struct fb_info *info, unsigned int cmd,
unsigned long arg) unsigned long arg)
{ {
mm_segment_t old_fs;
struct fb_fix_screeninfo fix; struct fb_fix_screeninfo fix;
struct fb_fix_screeninfo32 __user *fix32;
int err;
fix32 = compat_ptr(arg);
old_fs = get_fs();
set_fs(KERNEL_DS);
err = do_fb_ioctl(info, cmd, (unsigned long) &fix);
set_fs(old_fs);
if (!err)
err = do_fscreeninfo_to_user(&fix, fix32);
return err; if (!lock_fb_info(info))
return -ENODEV;
fix = info->fix;
unlock_fb_info(info);
return do_fscreeninfo_to_user(&fix, compat_ptr(arg));
} }
static long fb_compat_ioctl(struct file *file, unsigned int cmd, static long fb_compat_ioctl(struct file *file, unsigned int cmd,
......
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