unsigned int cmd, unsigned long argl)
{
struct saa7146 *saa = file->private_data;
- void *arg = (void *)argl;
+ void __user *arg = (void __user *)argl;
switch (cmd) {
case VIDIOCGCAP:
vu.radio = VIDEO_NO_UNIT;
vu.audio = VIDEO_NO_UNIT;
vu.teletext = VIDEO_NO_UNIT;
- if (copy_to_user((void *) arg, (void *) &vu, sizeof(vu)))
+ if (copy_to_user(arg, &vu, sizeof(vu)))
return -EFAULT;
return 0;
}
struct video_code ucode;
__u8 *udata;
int i;
- if (copy_from_user((void *) &ucode, arg,
- sizeof(ucode)))
+ if (copy_from_user(&ucode, arg, sizeof(ucode)))
return -EFAULT;
if (ucode.datasize > 65536 || ucode.datasize < 1024 ||
strncmp(ucode.loadwhat, "dec", 3))
return -EINVAL;
if ((udata = vmalloc(ucode.datasize)) == NULL)
return -ENOMEM;
- if (copy_from_user((void *) udata, ucode.data,
- ucode.datasize)) {
+ if (copy_from_user(udata, ucode.data, ucode.datasize)) {
vfree(udata);
return -EFAULT;
}
return -EINVAL;
}
-static ssize_t saa_read(struct file *file, char *buf,
+static ssize_t saa_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
return -EINVAL;
}
-static ssize_t saa_write(struct file *file, const char *buf,
+static ssize_t saa_write(struct file *file, const char __user *buf,
size_t count, loff_t *ppos)
{
struct saa7146 *saa = file->private_data;