X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fvideo%2Fsbuslib.c;h=3820d7e628657664a0e791571c44b68bc64eeda5;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=c1ab754d38c6241ad778830b0e84d555644e0a47;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/drivers/video/sbuslib.c b/drivers/video/sbuslib.c index c1ab754d3..3820d7e62 100644 --- a/drivers/video/sbuslib.c +++ b/drivers/video/sbuslib.c @@ -93,7 +93,7 @@ int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg, { switch(cmd) { case FBIOGTYPE: { - struct fbtype *f = (struct fbtype *) arg; + struct fbtype __user *f = (struct fbtype __user *) arg; if (put_user(type, &f->fb_type) || __put_user(info->var.yres, &f->fb_height) || @@ -105,10 +105,12 @@ int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg, return 0; } case FBIOPUTCMAP_SPARC: { - struct fbcmap *c = (struct fbcmap *) arg; + struct fbcmap __user *c = (struct fbcmap __user *) arg; struct fb_cmap cmap; u16 red, green, blue; - unsigned char *ured, *ugreen, *ublue; + unsigned char __user *ured; + unsigned char __user *ugreen; + unsigned char __user *ublue; int index, count, i; if (get_user(index, &c->index) || @@ -132,15 +134,17 @@ int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg, return -EFAULT; cmap.start = index + i; - err = fb_set_cmap(&cmap, 0, info); + err = fb_set_cmap(&cmap, info); if (err) return err; } return 0; } case FBIOGETCMAP_SPARC: { - struct fbcmap *c = (struct fbcmap *) arg; - unsigned char *ured, *ugreen, *ublue; + struct fbcmap __user *c = (struct fbcmap __user *) arg; + unsigned char __user *ured; + unsigned char __user *ugreen; + unsigned char __user *ublue; struct fb_cmap *cmap = &info->cmap; int index, count, i;