unsigned long arg)
{
int minor = MINOR(inode->i_rdev); /* What device are we ioctl()'ing? */
+ void __user *up = (void __user *)arg;
if (minor >= MAXBOARDS || minor < 0)
return -ENODEV;
{
struct dt3155_config tmp;
- if (copy_from_user((void *)&tmp, (void *) arg, sizeof(tmp)))
+ if (copy_from_user(&tmp, up, sizeof(tmp)))
return -EFAULT;
/* check for valid settings */
if (tmp.rows > DT3155_MAX_ROWS ||
}
case DT3155_GET_CONFIG:
{
- if (copy_to_user((void *) arg, (void *) &dt3155_status[minor],
+ if (copy_to_user(up, &dt3155_status[minor],
sizeof(struct dt3155_status)))
return -EFAULT;
return 0;
return 0;
quick_stop(minor);
- if (copy_to_user((void *) arg, (void *) &dt3155_status[minor],
+ if (copy_to_user(up, &dt3155_status[minor],
sizeof(struct dt3155_status)))
return -EFAULT;
return 0;
}
dt3155_init_isr(minor);
- if (copy_to_user((void *) arg, (void *) &dt3155_status[minor],
+ if (copy_to_user(up, &dt3155_status[minor],
sizeof(struct dt3155_status)))
return -EFAULT;
return 0;
/* make this an offset */
offset = frame_info->addr - dt3155_status[minor].mem_addr;
- put_user(offset, (unsigned int *) buf);
+ put_user(offset, (unsigned int __user *)buf);
buf += sizeof(u32);
- put_user(dt3155_status[minor].fbuffer.frame_count, (unsigned int *) buf);
+ put_user(dt3155_status[minor].fbuffer.frame_count, (unsigned int __user *)buf);
buf += sizeof(u32);
- put_user(dt3155_status[minor].state, (unsigned int *) buf);
+ put_user(dt3155_status[minor].state, (unsigned int __user *)buf);
buf += sizeof(u32);
if (copy_to_user(buf, frame_info, sizeof(*frame_info)))
return -EFAULT;