X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fmedia%2Fvideo%2Fstradis.c;h=37545acdb02353ddd4bf79fa4c3bf62168b4f8b5;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=10e4c56bfb33a914f64fb3b762ada4184aa46550;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/drivers/media/video/stradis.c b/drivers/media/video/stradis.c index 10e4c56bf..37545acdb 100644 --- a/drivers/media/video/stradis.c +++ b/drivers/media/video/stradis.c @@ -1322,7 +1322,7 @@ static int saa_ioctl(struct inode *inode, struct file *file, 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: @@ -1580,7 +1580,7 @@ static int saa_ioctl(struct inode *inode, struct file *file, 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; } @@ -1754,16 +1754,14 @@ static int saa_ioctl(struct inode *inode, struct file *file, 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; } @@ -1814,13 +1812,13 @@ static int saa_mmap(struct file *file, struct vm_area_struct *vma) 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;