X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fvideo%2Fsbuslib.c;h=3820d7e628657664a0e791571c44b68bc64eeda5;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=a09be527d7597de60206fb8c88bb0462d543f848;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/drivers/video/sbuslib.c b/drivers/video/sbuslib.c index a09be527d..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) || @@ -122,6 +124,7 @@ int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg, cmap.red = &red; cmap.green = &green; cmap.blue = &blue; + cmap.transp = NULL; for (i = 0; i < count; i++) { int err; @@ -131,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;