Commit 00ca7784 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] annotations in drivers/video

Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.org.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 9e943963
......@@ -2149,7 +2149,7 @@ static int aty128fb_ioctl(struct inode *inode, struct file *file, u_int cmd,
case FBIO_ATY128_SET_MIRROR:
if (par->chip_gen != rage_M3)
return -EINVAL;
rc = get_user(value, (__u32*)arg);
rc = get_user(value, (__u32 __user *)arg);
if (rc)
return rc;
par->lcd_on = (value & 0x01) != 0;
......@@ -2163,7 +2163,7 @@ static int aty128fb_ioctl(struct inode *inode, struct file *file, u_int cmd,
if (par->chip_gen != rage_M3)
return -EINVAL;
value = (par->crt_on << 1) | par->lcd_on;
return put_user(value, (__u32*)arg);
return put_user(value, (__u32 __user *)arg);
}
#endif
return -EINVAL;
......
......@@ -1037,7 +1037,7 @@ static int atyfb_ioctl(struct inode *inode, struct file *file, u_int cmd,
fbtyp.fb_cmsize = info->cmap.len;
fbtyp.fb_size = info->fix.smem_len;
if (copy_to_user
((struct fbtype *) arg, &fbtyp, sizeof(fbtyp)))
((struct fbtype __user *) arg, &fbtyp, sizeof(fbtyp)))
return -EFAULT;
break;
#endif /* __sparc__ */
......
......@@ -278,7 +278,7 @@ static int cg14_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
{
struct cg14_par *par = (struct cg14_par *) info->par;
struct cg14_regs *regs = par->regs;
struct mdi_cfginfo kmdi, *mdii;
struct mdi_cfginfo kmdi, __user *mdii;
unsigned long flags;
int cur_mode, mode, ret = 0;
......@@ -301,13 +301,13 @@ static int cg14_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
kmdi.mdi_size = par->ramsize;
spin_unlock_irqrestore(&par->lock, flags);
mdii = (struct mdi_cfginfo *) arg;
mdii = (struct mdi_cfginfo __user *) arg;
if (copy_to_user(mdii, &kmdi, sizeof(kmdi)))
ret = -EFAULT;
break;
case MDI_SET_PIXELMODE:
if (get_user(mode, (int *) arg)) {
if (get_user(mode, (int __user *) arg)) {
ret = -EFAULT;
break;
}
......
......@@ -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) ||
......@@ -139,8 +141,10 @@ int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg,
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;
......
#ifndef __LINUX_FBIO_H
#define __LINUX_FBIO_H
#include <linux/compiler.h>
/* Constants used for fbio SunOS compatibility */
/* (C) 1996 Miguel de Icaza */
......@@ -56,9 +58,9 @@ struct fbtype {
struct fbcmap {
int index; /* first element (0 origin) */
int count;
unsigned char *red;
unsigned char *green;
unsigned char *blue;
unsigned char __user *red;
unsigned char __user *green;
unsigned char __user *blue;
};
#ifdef __KERNEL__
......
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