diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-11-01 07:25:11 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-29 14:53:26 -0500 |
commit | f473bf76c71ca734a16f9331ce6b6e9603641888 (patch) | |
tree | 033261b06286aef5dc6cde0aa961d828e2ffae7a /drivers/media | |
parent | bef216b7edb0fac356565dea4bd65131bf6f9c4a (diff) |
V4L/DVB (9503): v4l: remove inode argument from video_usercopy
The inode argument was never used. Removing it from video_usercopy
brings the function pointer type of video_usercopy in line with similar
v4l2 functions, thus simplifying several drivers.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
24 files changed, 54 insertions, 96 deletions
diff --git a/drivers/media/common/saa7146_fops.c b/drivers/media/common/saa7146_fops.c index 127b0526a727..7d844af88384 100644 --- a/drivers/media/common/saa7146_fops.c +++ b/drivers/media/common/saa7146_fops.c | |||
@@ -313,7 +313,7 @@ static int fops_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | |||
313 | /* | 313 | /* |
314 | DEB_EE(("inode:%p, file:%p, cmd:%d, arg:%li\n",inode, file, cmd, arg)); | 314 | DEB_EE(("inode:%p, file:%p, cmd:%d, arg:%li\n",inode, file, cmd, arg)); |
315 | */ | 315 | */ |
316 | return video_usercopy(inode, file, cmd, arg, saa7146_video_do_ioctl); | 316 | return video_usercopy(file, cmd, arg, saa7146_video_do_ioctl); |
317 | } | 317 | } |
318 | 318 | ||
319 | static int fops_mmap(struct file *file, struct vm_area_struct * vma) | 319 | static int fops_mmap(struct file *file, struct vm_area_struct * vma) |
diff --git a/drivers/media/common/saa7146_video.c b/drivers/media/common/saa7146_video.c index fe0bd55977e3..101b01dbb8ea 100644 --- a/drivers/media/common/saa7146_video.c +++ b/drivers/media/common/saa7146_video.c | |||
@@ -834,7 +834,7 @@ static int video_end(struct saa7146_fh *fh, struct file *file) | |||
834 | * copying is done already, arg is a kernel pointer. | 834 | * copying is done already, arg is a kernel pointer. |
835 | */ | 835 | */ |
836 | 836 | ||
837 | static int __saa7146_video_do_ioctl(struct file *file, unsigned int cmd, void *arg) | 837 | int saa7146_video_do_ioctl(struct file *file, unsigned int cmd, void *arg) |
838 | { | 838 | { |
839 | struct saa7146_fh *fh = file->private_data; | 839 | struct saa7146_fh *fh = file->private_data; |
840 | struct saa7146_dev *dev = fh->dev; | 840 | struct saa7146_dev *dev = fh->dev; |
@@ -1216,17 +1216,11 @@ static int __saa7146_video_do_ioctl(struct file *file, unsigned int cmd, void *a | |||
1216 | #endif | 1216 | #endif |
1217 | default: | 1217 | default: |
1218 | return v4l_compat_translate_ioctl(file, cmd, arg, | 1218 | return v4l_compat_translate_ioctl(file, cmd, arg, |
1219 | __saa7146_video_do_ioctl); | 1219 | saa7146_video_do_ioctl); |
1220 | } | 1220 | } |
1221 | return 0; | 1221 | return 0; |
1222 | } | 1222 | } |
1223 | 1223 | ||
1224 | int saa7146_video_do_ioctl(struct inode *inode, struct file *file, | ||
1225 | unsigned int cmd, void *arg) | ||
1226 | { | ||
1227 | return __saa7146_video_do_ioctl(file, cmd, arg); | ||
1228 | } | ||
1229 | |||
1230 | /*********************************************************************************/ | 1224 | /*********************************************************************************/ |
1231 | /* buffer handling functions */ | 1225 | /* buffer handling functions */ |
1232 | 1226 | ||
diff --git a/drivers/media/video/arv.c b/drivers/media/video/arv.c index e09b00693230..2ba6abd92b6f 100644 --- a/drivers/media/video/arv.c +++ b/drivers/media/video/arv.c | |||
@@ -396,8 +396,7 @@ out_up: | |||
396 | return ret; | 396 | return ret; |
397 | } | 397 | } |
398 | 398 | ||
399 | static int ar_do_ioctl(struct inode *inode, struct file *file, | 399 | static int ar_do_ioctl(struct file *file, unsigned int cmd, void *arg) |
400 | unsigned int cmd, void *arg) | ||
401 | { | 400 | { |
402 | struct video_device *dev = video_devdata(file); | 401 | struct video_device *dev = video_devdata(file); |
403 | struct ar_device *ar = video_get_drvdata(dev); | 402 | struct ar_device *ar = video_get_drvdata(dev); |
@@ -543,7 +542,7 @@ static int ar_do_ioctl(struct inode *inode, struct file *file, | |||
543 | static int ar_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | 542 | static int ar_ioctl(struct inode *inode, struct file *file, unsigned int cmd, |
544 | unsigned long arg) | 543 | unsigned long arg) |
545 | { | 544 | { |
546 | return video_usercopy(inode, file, cmd, arg, ar_do_ioctl); | 545 | return video_usercopy(file, cmd, arg, ar_do_ioctl); |
547 | } | 546 | } |
548 | 547 | ||
549 | #if USE_INT | 548 | #if USE_INT |
diff --git a/drivers/media/video/bw-qcam.c b/drivers/media/video/bw-qcam.c index ace4ff9ea023..17f80d03f38e 100644 --- a/drivers/media/video/bw-qcam.c +++ b/drivers/media/video/bw-qcam.c | |||
@@ -706,8 +706,7 @@ static long qc_capture(struct qcam_device * q, char __user *buf, unsigned long l | |||
706 | * Video4linux interfacing | 706 | * Video4linux interfacing |
707 | */ | 707 | */ |
708 | 708 | ||
709 | static int qcam_do_ioctl(struct inode *inode, struct file *file, | 709 | static int qcam_do_ioctl(struct file *file, unsigned int cmd, void *arg) |
710 | unsigned int cmd, void *arg) | ||
711 | { | 710 | { |
712 | struct video_device *dev = video_devdata(file); | 711 | struct video_device *dev = video_devdata(file); |
713 | struct qcam_device *qcam=(struct qcam_device *)dev; | 712 | struct qcam_device *qcam=(struct qcam_device *)dev; |
@@ -867,7 +866,7 @@ static int qcam_do_ioctl(struct inode *inode, struct file *file, | |||
867 | static int qcam_ioctl(struct inode *inode, struct file *file, | 866 | static int qcam_ioctl(struct inode *inode, struct file *file, |
868 | unsigned int cmd, unsigned long arg) | 867 | unsigned int cmd, unsigned long arg) |
869 | { | 868 | { |
870 | return video_usercopy(inode, file, cmd, arg, qcam_do_ioctl); | 869 | return video_usercopy(file, cmd, arg, qcam_do_ioctl); |
871 | } | 870 | } |
872 | 871 | ||
873 | static ssize_t qcam_read(struct file *file, char __user *buf, | 872 | static ssize_t qcam_read(struct file *file, char __user *buf, |
diff --git a/drivers/media/video/c-qcam.c b/drivers/media/video/c-qcam.c index 0f930d351466..21c71eb085db 100644 --- a/drivers/media/video/c-qcam.c +++ b/drivers/media/video/c-qcam.c | |||
@@ -500,8 +500,7 @@ static long qc_capture(struct qcam_device *q, char __user *buf, unsigned long le | |||
500 | * Video4linux interfacing | 500 | * Video4linux interfacing |
501 | */ | 501 | */ |
502 | 502 | ||
503 | static int qcam_do_ioctl(struct inode *inode, struct file *file, | 503 | static int qcam_do_ioctl(struct file *file, unsigned int cmd, void *arg) |
504 | unsigned int cmd, void *arg) | ||
505 | { | 504 | { |
506 | struct video_device *dev = video_devdata(file); | 505 | struct video_device *dev = video_devdata(file); |
507 | struct qcam_device *qcam=(struct qcam_device *)dev; | 506 | struct qcam_device *qcam=(struct qcam_device *)dev; |
@@ -667,9 +666,9 @@ static int qcam_do_ioctl(struct inode *inode, struct file *file, | |||
667 | } | 666 | } |
668 | 667 | ||
669 | static int qcam_ioctl(struct inode *inode, struct file *file, | 668 | static int qcam_ioctl(struct inode *inode, struct file *file, |
670 | unsigned int cmd, unsigned long arg) | 669 | unsigned int cmd, unsigned long arg) |
671 | { | 670 | { |
672 | return video_usercopy(inode, file, cmd, arg, qcam_do_ioctl); | 671 | return video_usercopy(file, cmd, arg, qcam_do_ioctl); |
673 | } | 672 | } |
674 | 673 | ||
675 | static ssize_t qcam_read(struct file *file, char __user *buf, | 674 | static ssize_t qcam_read(struct file *file, char __user *buf, |
diff --git a/drivers/media/video/cpia.c b/drivers/media/video/cpia.c index 16c094f77852..028a400d2453 100644 --- a/drivers/media/video/cpia.c +++ b/drivers/media/video/cpia.c | |||
@@ -3333,8 +3333,7 @@ static ssize_t cpia_read(struct file *file, char __user *buf, | |||
3333 | return cam->decompressed_frame.count; | 3333 | return cam->decompressed_frame.count; |
3334 | } | 3334 | } |
3335 | 3335 | ||
3336 | static int cpia_do_ioctl(struct inode *inode, struct file *file, | 3336 | static int cpia_do_ioctl(struct file *file, unsigned int cmd, void *arg) |
3337 | unsigned int ioctlnr, void *arg) | ||
3338 | { | 3337 | { |
3339 | struct video_device *dev = file->private_data; | 3338 | struct video_device *dev = file->private_data; |
3340 | struct cam_data *cam = video_get_drvdata(dev); | 3339 | struct cam_data *cam = video_get_drvdata(dev); |
@@ -3347,9 +3346,9 @@ static int cpia_do_ioctl(struct inode *inode, struct file *file, | |||
3347 | if (mutex_lock_interruptible(&cam->busy_lock)) | 3346 | if (mutex_lock_interruptible(&cam->busy_lock)) |
3348 | return -EINTR; | 3347 | return -EINTR; |
3349 | 3348 | ||
3350 | //DBG("cpia_ioctl: %u\n", ioctlnr); | 3349 | /* DBG("cpia_ioctl: %u\n", cmd); */ |
3351 | 3350 | ||
3352 | switch (ioctlnr) { | 3351 | switch (cmd) { |
3353 | /* query capabilities */ | 3352 | /* query capabilities */ |
3354 | case VIDIOCGCAP: | 3353 | case VIDIOCGCAP: |
3355 | { | 3354 | { |
@@ -3724,7 +3723,7 @@ static int cpia_do_ioctl(struct inode *inode, struct file *file, | |||
3724 | static int cpia_ioctl(struct inode *inode, struct file *file, | 3723 | static int cpia_ioctl(struct inode *inode, struct file *file, |
3725 | unsigned int cmd, unsigned long arg) | 3724 | unsigned int cmd, unsigned long arg) |
3726 | { | 3725 | { |
3727 | return video_usercopy(inode, file, cmd, arg, cpia_do_ioctl); | 3726 | return video_usercopy(file, cmd, arg, cpia_do_ioctl); |
3728 | } | 3727 | } |
3729 | 3728 | ||
3730 | 3729 | ||
diff --git a/drivers/media/video/cpia2/cpia2_v4l.c b/drivers/media/video/cpia2/cpia2_v4l.c index d9de2e8e00d4..3c2d7eac1197 100644 --- a/drivers/media/video/cpia2/cpia2_v4l.c +++ b/drivers/media/video/cpia2/cpia2_v4l.c | |||
@@ -1572,8 +1572,7 @@ static int ioctl_dqbuf(void *arg,struct camera_data *cam, struct file *file) | |||
1572 | * cpia2_ioctl | 1572 | * cpia2_ioctl |
1573 | * | 1573 | * |
1574 | *****************************************************************************/ | 1574 | *****************************************************************************/ |
1575 | static int cpia2_do_ioctl(struct inode *inode, struct file *file, | 1575 | static int cpia2_do_ioctl(struct file *file, unsigned int cmd, void *arg) |
1576 | unsigned int ioctl_nr, void *arg) | ||
1577 | { | 1576 | { |
1578 | struct camera_data *cam = video_drvdata(file); | 1577 | struct camera_data *cam = video_drvdata(file); |
1579 | int retval = 0; | 1578 | int retval = 0; |
@@ -1591,7 +1590,7 @@ static int cpia2_do_ioctl(struct inode *inode, struct file *file, | |||
1591 | } | 1590 | } |
1592 | 1591 | ||
1593 | /* Priority check */ | 1592 | /* Priority check */ |
1594 | switch (ioctl_nr) { | 1593 | switch (cmd) { |
1595 | case VIDIOCSWIN: | 1594 | case VIDIOCSWIN: |
1596 | case VIDIOCMCAPTURE: | 1595 | case VIDIOCMCAPTURE: |
1597 | case VIDIOC_S_FMT: | 1596 | case VIDIOC_S_FMT: |
@@ -1618,7 +1617,7 @@ static int cpia2_do_ioctl(struct inode *inode, struct file *file, | |||
1618 | break; | 1617 | break; |
1619 | } | 1618 | } |
1620 | 1619 | ||
1621 | switch (ioctl_nr) { | 1620 | switch (cmd) { |
1622 | case VIDIOCGCAP: /* query capabilities */ | 1621 | case VIDIOCGCAP: /* query capabilities */ |
1623 | retval = ioctl_cap_query(arg, cam); | 1622 | retval = ioctl_cap_query(arg, cam); |
1624 | break; | 1623 | break; |
@@ -1683,7 +1682,7 @@ static int cpia2_do_ioctl(struct inode *inode, struct file *file, | |||
1683 | case VIDIOC_ENUMINPUT: | 1682 | case VIDIOC_ENUMINPUT: |
1684 | case VIDIOC_G_INPUT: | 1683 | case VIDIOC_G_INPUT: |
1685 | case VIDIOC_S_INPUT: | 1684 | case VIDIOC_S_INPUT: |
1686 | retval = ioctl_input(ioctl_nr, arg,cam); | 1685 | retval = ioctl_input(cmd, arg, cam); |
1687 | break; | 1686 | break; |
1688 | 1687 | ||
1689 | case VIDIOC_ENUM_FMT: | 1688 | case VIDIOC_ENUM_FMT: |
@@ -1843,9 +1842,9 @@ static int cpia2_do_ioctl(struct inode *inode, struct file *file, | |||
1843 | } | 1842 | } |
1844 | 1843 | ||
1845 | static int cpia2_ioctl(struct inode *inode, struct file *file, | 1844 | static int cpia2_ioctl(struct inode *inode, struct file *file, |
1846 | unsigned int ioctl_nr, unsigned long iarg) | 1845 | unsigned int cmd, unsigned long arg) |
1847 | { | 1846 | { |
1848 | return video_usercopy(inode, file, ioctl_nr, iarg, cpia2_do_ioctl); | 1847 | return video_usercopy(file, cmd, arg, cpia2_do_ioctl); |
1849 | } | 1848 | } |
1850 | 1849 | ||
1851 | /****************************************************************************** | 1850 | /****************************************************************************** |
diff --git a/drivers/media/video/ov511.c b/drivers/media/video/ov511.c index 210f1240b331..6ee9b69cc4a9 100644 --- a/drivers/media/video/ov511.c +++ b/drivers/media/video/ov511.c | |||
@@ -4011,8 +4011,7 @@ ov51x_v4l1_close(struct inode *inode, struct file *file) | |||
4011 | 4011 | ||
4012 | /* Do not call this function directly! */ | 4012 | /* Do not call this function directly! */ |
4013 | static int | 4013 | static int |
4014 | ov51x_v4l1_ioctl_internal(struct inode *inode, struct file *file, | 4014 | ov51x_v4l1_ioctl_internal(struct file *file, unsigned int cmd, void *arg) |
4015 | unsigned int cmd, void *arg) | ||
4016 | { | 4015 | { |
4017 | struct video_device *vdev = file->private_data; | 4016 | struct video_device *vdev = file->private_data; |
4018 | struct usb_ov511 *ov = video_get_drvdata(vdev); | 4017 | struct usb_ov511 *ov = video_get_drvdata(vdev); |
@@ -4461,7 +4460,7 @@ ov51x_v4l1_ioctl(struct inode *inode, struct file *file, | |||
4461 | if (mutex_lock_interruptible(&ov->lock)) | 4460 | if (mutex_lock_interruptible(&ov->lock)) |
4462 | return -EINTR; | 4461 | return -EINTR; |
4463 | 4462 | ||
4464 | rc = video_usercopy(inode, file, cmd, arg, ov51x_v4l1_ioctl_internal); | 4463 | rc = video_usercopy(file, cmd, arg, ov51x_v4l1_ioctl_internal); |
4465 | 4464 | ||
4466 | mutex_unlock(&ov->lock); | 4465 | mutex_unlock(&ov->lock); |
4467 | return rc; | 4466 | return rc; |
diff --git a/drivers/media/video/pms.c b/drivers/media/video/pms.c index 8062d0016997..45730fac1570 100644 --- a/drivers/media/video/pms.c +++ b/drivers/media/video/pms.c | |||
@@ -680,8 +680,7 @@ static int pms_capture(struct pms_device *dev, char __user *buf, int rgb555, int | |||
680 | * Video4linux interfacing | 680 | * Video4linux interfacing |
681 | */ | 681 | */ |
682 | 682 | ||
683 | static int pms_do_ioctl(struct inode *inode, struct file *file, | 683 | static int pms_do_ioctl(struct file *file, unsigned int cmd, void *arg) |
684 | unsigned int cmd, void *arg) | ||
685 | { | 684 | { |
686 | struct video_device *dev = video_devdata(file); | 685 | struct video_device *dev = video_devdata(file); |
687 | struct pms_device *pd=(struct pms_device *)dev; | 686 | struct pms_device *pd=(struct pms_device *)dev; |
@@ -866,7 +865,7 @@ static int pms_do_ioctl(struct inode *inode, struct file *file, | |||
866 | static int pms_ioctl(struct inode *inode, struct file *file, | 865 | static int pms_ioctl(struct inode *inode, struct file *file, |
867 | unsigned int cmd, unsigned long arg) | 866 | unsigned int cmd, unsigned long arg) |
868 | { | 867 | { |
869 | return video_usercopy(inode, file, cmd, arg, pms_do_ioctl); | 868 | return video_usercopy(file, cmd, arg, pms_do_ioctl); |
870 | } | 869 | } |
871 | 870 | ||
872 | static ssize_t pms_read(struct file *file, char __user *buf, | 871 | static ssize_t pms_read(struct file *file, char __user *buf, |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c index 97ed95957992..52af1c435965 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c +++ b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c | |||
@@ -168,8 +168,7 @@ static const char *get_v4l_name(int v4l_type) | |||
168 | * This is part of Video 4 Linux API. The procedure handles ioctl() calls. | 168 | * This is part of Video 4 Linux API. The procedure handles ioctl() calls. |
169 | * | 169 | * |
170 | */ | 170 | */ |
171 | static int __pvr2_v4l2_do_ioctl(struct file *file, | 171 | static int pvr2_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg) |
172 | unsigned int cmd, void *arg) | ||
173 | { | 172 | { |
174 | struct pvr2_v4l2_fh *fh = file->private_data; | 173 | struct pvr2_v4l2_fh *fh = file->private_data; |
175 | struct pvr2_v4l2 *vp = fh->vhead; | 174 | struct pvr2_v4l2 *vp = fh->vhead; |
@@ -864,7 +863,7 @@ static int __pvr2_v4l2_do_ioctl(struct file *file, | |||
864 | 863 | ||
865 | default : | 864 | default : |
866 | ret = v4l_compat_translate_ioctl(file, cmd, | 865 | ret = v4l_compat_translate_ioctl(file, cmd, |
867 | arg, __pvr2_v4l2_do_ioctl); | 866 | arg, pvr2_v4l2_do_ioctl); |
868 | } | 867 | } |
869 | 868 | ||
870 | pvr2_hdw_commit_ctl(hdw); | 869 | pvr2_hdw_commit_ctl(hdw); |
@@ -890,12 +889,6 @@ static int __pvr2_v4l2_do_ioctl(struct file *file, | |||
890 | return ret; | 889 | return ret; |
891 | } | 890 | } |
892 | 891 | ||
893 | static int pvr2_v4l2_do_ioctl(struct inode *inode, struct file *file, | ||
894 | unsigned int cmd, void *arg) | ||
895 | { | ||
896 | return __pvr2_v4l2_do_ioctl(file, cmd, arg); | ||
897 | } | ||
898 | |||
899 | static void pvr2_v4l2_dev_destroy(struct pvr2_v4l2_dev *dip) | 892 | static void pvr2_v4l2_dev_destroy(struct pvr2_v4l2_dev *dip) |
900 | { | 893 | { |
901 | int num = dip->devbase.num; | 894 | int num = dip->devbase.num; |
@@ -963,7 +956,7 @@ static int pvr2_v4l2_ioctl(struct inode *inode, struct file *file, | |||
963 | #define IVTV_IOC_G_CODEC 0xFFEE7703 | 956 | #define IVTV_IOC_G_CODEC 0xFFEE7703 |
964 | #define IVTV_IOC_S_CODEC 0xFFEE7704 | 957 | #define IVTV_IOC_S_CODEC 0xFFEE7704 |
965 | if (cmd == IVTV_IOC_G_CODEC || cmd == IVTV_IOC_S_CODEC) return 0; | 958 | if (cmd == IVTV_IOC_G_CODEC || cmd == IVTV_IOC_S_CODEC) return 0; |
966 | return video_usercopy(inode, file, cmd, arg, pvr2_v4l2_do_ioctl); | 959 | return video_usercopy(file, cmd, arg, pvr2_v4l2_do_ioctl); |
967 | } | 960 | } |
968 | 961 | ||
969 | 962 | ||
diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c index f3897a3fdb75..1ce9da167b7e 100644 --- a/drivers/media/video/pwc/pwc-if.c +++ b/drivers/media/video/pwc/pwc-if.c | |||
@@ -1412,7 +1412,7 @@ static int pwc_video_ioctl(struct inode *inode, struct file *file, | |||
1412 | 1412 | ||
1413 | mutex_lock(&pdev->modlock); | 1413 | mutex_lock(&pdev->modlock); |
1414 | if (!pdev->unplugged) | 1414 | if (!pdev->unplugged) |
1415 | r = video_usercopy(inode, file, cmd, arg, pwc_video_do_ioctl); | 1415 | r = video_usercopy(file, cmd, arg, pwc_video_do_ioctl); |
1416 | mutex_unlock(&pdev->modlock); | 1416 | mutex_unlock(&pdev->modlock); |
1417 | out: | 1417 | out: |
1418 | return r; | 1418 | return r; |
diff --git a/drivers/media/video/pwc/pwc-v4l.c b/drivers/media/video/pwc/pwc-v4l.c index 76a1376c9751..d7c147328e35 100644 --- a/drivers/media/video/pwc/pwc-v4l.c +++ b/drivers/media/video/pwc/pwc-v4l.c | |||
@@ -337,8 +337,7 @@ static int pwc_vidioc_set_fmt(struct pwc_device *pdev, struct v4l2_format *f) | |||
337 | 337 | ||
338 | } | 338 | } |
339 | 339 | ||
340 | int pwc_video_do_ioctl(struct inode *inode, struct file *file, | 340 | int pwc_video_do_ioctl(struct file *file, unsigned int cmd, void *arg) |
341 | unsigned int cmd, void *arg) | ||
342 | { | 341 | { |
343 | struct video_device *vdev = video_devdata(file); | 342 | struct video_device *vdev = video_devdata(file); |
344 | struct pwc_device *pdev; | 343 | struct pwc_device *pdev; |
diff --git a/drivers/media/video/pwc/pwc.h b/drivers/media/video/pwc/pwc.h index 74178754b39b..c046a2535668 100644 --- a/drivers/media/video/pwc/pwc.h +++ b/drivers/media/video/pwc/pwc.h | |||
@@ -340,8 +340,7 @@ extern int pwc_camera_power(struct pwc_device *pdev, int power); | |||
340 | extern int pwc_ioctl(struct pwc_device *pdev, unsigned int cmd, void *arg); | 340 | extern int pwc_ioctl(struct pwc_device *pdev, unsigned int cmd, void *arg); |
341 | 341 | ||
342 | /** Functions in pwc-v4l.c */ | 342 | /** Functions in pwc-v4l.c */ |
343 | extern int pwc_video_do_ioctl(struct inode *inode, struct file *file, | 343 | extern int pwc_video_do_ioctl(struct file *file, unsigned int cmd, void *arg); |
344 | unsigned int cmd, void *arg); | ||
345 | 344 | ||
346 | /** pwc-uncompress.c */ | 345 | /** pwc-uncompress.c */ |
347 | /* Expand frame to image, possibly including decompression. Uses read_frame and fill_image */ | 346 | /* Expand frame to image, possibly including decompression. Uses read_frame and fill_image */ |
diff --git a/drivers/media/video/saa5246a.c b/drivers/media/video/saa5246a.c index 9d4582651467..f159441e9375 100644 --- a/drivers/media/video/saa5246a.c +++ b/drivers/media/video/saa5246a.c | |||
@@ -804,8 +804,7 @@ static inline int saa5246a_stop_dau(struct saa5246a_device *t, | |||
804 | * | 804 | * |
805 | * Returns 0 if successful | 805 | * Returns 0 if successful |
806 | */ | 806 | */ |
807 | static int do_saa5246a_ioctl(struct inode *inode, struct file *file, | 807 | static int do_saa5246a_ioctl(struct file *file, unsigned int cmd, void *arg) |
808 | unsigned int cmd, void *arg) | ||
809 | { | 808 | { |
810 | struct saa5246a_device *t = video_drvdata(file); | 809 | struct saa5246a_device *t = video_drvdata(file); |
811 | 810 | ||
@@ -953,7 +952,7 @@ static int saa5246a_ioctl(struct inode *inode, struct file *file, | |||
953 | 952 | ||
954 | cmd = vtx_fix_command(cmd); | 953 | cmd = vtx_fix_command(cmd); |
955 | mutex_lock(&t->lock); | 954 | mutex_lock(&t->lock); |
956 | err = video_usercopy(inode, file, cmd, arg, do_saa5246a_ioctl); | 955 | err = video_usercopy(file, cmd, arg, do_saa5246a_ioctl); |
957 | mutex_unlock(&t->lock); | 956 | mutex_unlock(&t->lock); |
958 | return err; | 957 | return err; |
959 | } | 958 | } |
diff --git a/drivers/media/video/saa5249.c b/drivers/media/video/saa5249.c index 1594773e02d0..6ef3affb97f1 100644 --- a/drivers/media/video/saa5249.c +++ b/drivers/media/video/saa5249.c | |||
@@ -190,8 +190,7 @@ static int i2c_getdata(struct saa5249_device *t, int count, u8 *buf) | |||
190 | * Standard character-device-driver functions | 190 | * Standard character-device-driver functions |
191 | */ | 191 | */ |
192 | 192 | ||
193 | static int do_saa5249_ioctl(struct inode *inode, struct file *file, | 193 | static int do_saa5249_ioctl(struct file *file, unsigned int cmd, void *arg) |
194 | unsigned int cmd, void *arg) | ||
195 | { | 194 | { |
196 | static int virtual_mode = false; | 195 | static int virtual_mode = false; |
197 | struct saa5249_device *t = video_drvdata(file); | 196 | struct saa5249_device *t = video_drvdata(file); |
@@ -488,7 +487,7 @@ static int saa5249_ioctl(struct inode *inode, struct file *file, | |||
488 | 487 | ||
489 | cmd = vtx_fix_command(cmd); | 488 | cmd = vtx_fix_command(cmd); |
490 | mutex_lock(&t->lock); | 489 | mutex_lock(&t->lock); |
491 | err = video_usercopy(inode,file,cmd,arg,do_saa5249_ioctl); | 490 | err = video_usercopy(file, cmd, arg, do_saa5249_ioctl); |
492 | mutex_unlock(&t->lock); | 491 | mutex_unlock(&t->lock); |
493 | return err; | 492 | return err; |
494 | } | 493 | } |
diff --git a/drivers/media/video/se401.c b/drivers/media/video/se401.c index 044a2e94c34d..d652f25eef0e 100644 --- a/drivers/media/video/se401.c +++ b/drivers/media/video/se401.c | |||
@@ -975,8 +975,7 @@ static int se401_close(struct inode *inode, struct file *file) | |||
975 | return 0; | 975 | return 0; |
976 | } | 976 | } |
977 | 977 | ||
978 | static int se401_do_ioctl(struct inode *inode, struct file *file, | 978 | static int se401_do_ioctl(struct file *file, unsigned int cmd, void *arg) |
979 | unsigned int cmd, void *arg) | ||
980 | { | 979 | { |
981 | struct video_device *vdev = file->private_data; | 980 | struct video_device *vdev = file->private_data; |
982 | struct usb_se401 *se401 = (struct usb_se401 *)vdev; | 981 | struct usb_se401 *se401 = (struct usb_se401 *)vdev; |
@@ -1142,7 +1141,7 @@ static int se401_do_ioctl(struct inode *inode, struct file *file, | |||
1142 | static int se401_ioctl(struct inode *inode, struct file *file, | 1141 | static int se401_ioctl(struct inode *inode, struct file *file, |
1143 | unsigned int cmd, unsigned long arg) | 1142 | unsigned int cmd, unsigned long arg) |
1144 | { | 1143 | { |
1145 | return video_usercopy(inode, file, cmd, arg, se401_do_ioctl); | 1144 | return video_usercopy(file, cmd, arg, se401_do_ioctl); |
1146 | } | 1145 | } |
1147 | 1146 | ||
1148 | static ssize_t se401_read(struct file *file, char __user *buf, | 1147 | static ssize_t se401_read(struct file *file, char __user *buf, |
diff --git a/drivers/media/video/stv680.c b/drivers/media/video/stv680.c index 328c41b1517d..42acc92c182d 100644 --- a/drivers/media/video/stv680.c +++ b/drivers/media/video/stv680.c | |||
@@ -1132,8 +1132,7 @@ static int stv_close (struct inode *inode, struct file *file) | |||
1132 | return 0; | 1132 | return 0; |
1133 | } | 1133 | } |
1134 | 1134 | ||
1135 | static int stv680_do_ioctl (struct inode *inode, struct file *file, | 1135 | static int stv680_do_ioctl(struct file *file, unsigned int cmd, void *arg) |
1136 | unsigned int cmd, void *arg) | ||
1137 | { | 1136 | { |
1138 | struct video_device *vdev = file->private_data; | 1137 | struct video_device *vdev = file->private_data; |
1139 | struct usb_stv *stv680 = video_get_drvdata(vdev); | 1138 | struct usb_stv *stv680 = video_get_drvdata(vdev); |
@@ -1303,7 +1302,7 @@ static int stv680_do_ioctl (struct inode *inode, struct file *file, | |||
1303 | static int stv680_ioctl(struct inode *inode, struct file *file, | 1302 | static int stv680_ioctl(struct inode *inode, struct file *file, |
1304 | unsigned int cmd, unsigned long arg) | 1303 | unsigned int cmd, unsigned long arg) |
1305 | { | 1304 | { |
1306 | return video_usercopy(inode, file, cmd, arg, stv680_do_ioctl); | 1305 | return video_usercopy(file, cmd, arg, stv680_do_ioctl); |
1307 | } | 1306 | } |
1308 | 1307 | ||
1309 | static int stv680_mmap (struct file *file, struct vm_area_struct *vma) | 1308 | static int stv680_mmap (struct file *file, struct vm_area_struct *vma) |
diff --git a/drivers/media/video/usbvideo/usbvideo.c b/drivers/media/video/usbvideo/usbvideo.c index 7c575bb8184f..a42049de2bb6 100644 --- a/drivers/media/video/usbvideo/usbvideo.c +++ b/drivers/media/video/usbvideo/usbvideo.c | |||
@@ -1281,8 +1281,7 @@ static int usbvideo_v4l_close(struct inode *inode, struct file *file) | |||
1281 | * History: | 1281 | * History: |
1282 | * 22-Jan-2000 Corrected VIDIOCSPICT to reject unsupported settings. | 1282 | * 22-Jan-2000 Corrected VIDIOCSPICT to reject unsupported settings. |
1283 | */ | 1283 | */ |
1284 | static int usbvideo_v4l_do_ioctl(struct inode *inode, struct file *file, | 1284 | static int usbvideo_v4l_do_ioctl(struct file *file, unsigned int cmd, void *arg) |
1285 | unsigned int cmd, void *arg) | ||
1286 | { | 1285 | { |
1287 | struct uvd *uvd = file->private_data; | 1286 | struct uvd *uvd = file->private_data; |
1288 | 1287 | ||
@@ -1505,7 +1504,7 @@ static int usbvideo_v4l_do_ioctl(struct inode *inode, struct file *file, | |||
1505 | static int usbvideo_v4l_ioctl(struct inode *inode, struct file *file, | 1504 | static int usbvideo_v4l_ioctl(struct inode *inode, struct file *file, |
1506 | unsigned int cmd, unsigned long arg) | 1505 | unsigned int cmd, unsigned long arg) |
1507 | { | 1506 | { |
1508 | return video_usercopy(inode, file, cmd, arg, usbvideo_v4l_do_ioctl); | 1507 | return video_usercopy(file, cmd, arg, usbvideo_v4l_do_ioctl); |
1509 | } | 1508 | } |
1510 | 1509 | ||
1511 | /* | 1510 | /* |
diff --git a/drivers/media/video/usbvision/usbvision-video.c b/drivers/media/video/usbvision/usbvision-video.c index d185b57fdcd0..062819cabec4 100644 --- a/drivers/media/video/usbvision/usbvision-video.c +++ b/drivers/media/video/usbvision/usbvision-video.c | |||
@@ -1278,7 +1278,7 @@ static int usbvision_vbi_close(struct inode *inode, struct file *file) | |||
1278 | return -ENODEV; | 1278 | return -ENODEV; |
1279 | } | 1279 | } |
1280 | 1280 | ||
1281 | static int usbvision_do_vbi_ioctl(struct inode *inode, struct file *file, | 1281 | static int usbvision_do_vbi_ioctl(struct file *file, |
1282 | unsigned int cmd, void *arg) | 1282 | unsigned int cmd, void *arg) |
1283 | { | 1283 | { |
1284 | /* TODO */ | 1284 | /* TODO */ |
@@ -1288,7 +1288,7 @@ static int usbvision_do_vbi_ioctl(struct inode *inode, struct file *file, | |||
1288 | static int usbvision_vbi_ioctl(struct inode *inode, struct file *file, | 1288 | static int usbvision_vbi_ioctl(struct inode *inode, struct file *file, |
1289 | unsigned int cmd, unsigned long arg) | 1289 | unsigned int cmd, unsigned long arg) |
1290 | { | 1290 | { |
1291 | return video_usercopy(inode, file, cmd, arg, usbvision_do_vbi_ioctl); | 1291 | return video_usercopy(file, cmd, arg, usbvision_do_vbi_ioctl); |
1292 | } | 1292 | } |
1293 | 1293 | ||
1294 | 1294 | ||
diff --git a/drivers/media/video/uvc/uvc_v4l2.c b/drivers/media/video/uvc/uvc_v4l2.c index 758dfefaba8d..8361367806a9 100644 --- a/drivers/media/video/uvc/uvc_v4l2.c +++ b/drivers/media/video/uvc/uvc_v4l2.c | |||
@@ -464,8 +464,7 @@ static int uvc_v4l2_release(struct inode *inode, struct file *file) | |||
464 | return 0; | 464 | return 0; |
465 | } | 465 | } |
466 | 466 | ||
467 | static int __uvc_v4l2_do_ioctl(struct file *file, | 467 | static int uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg) |
468 | unsigned int cmd, void *arg) | ||
469 | { | 468 | { |
470 | struct video_device *vdev = video_devdata(file); | 469 | struct video_device *vdev = video_devdata(file); |
471 | struct uvc_video_device *video = video_get_drvdata(vdev); | 470 | struct uvc_video_device *video = video_get_drvdata(vdev); |
@@ -979,7 +978,7 @@ static int __uvc_v4l2_do_ioctl(struct file *file, | |||
979 | 978 | ||
980 | default: | 979 | default: |
981 | if ((ret = v4l_compat_translate_ioctl(file, cmd, arg, | 980 | if ((ret = v4l_compat_translate_ioctl(file, cmd, arg, |
982 | __uvc_v4l2_do_ioctl)) == -ENOIOCTLCMD) | 981 | uvc_v4l2_do_ioctl)) == -ENOIOCTLCMD) |
983 | uvc_trace(UVC_TRACE_IOCTL, "Unknown ioctl 0x%08x\n", | 982 | uvc_trace(UVC_TRACE_IOCTL, "Unknown ioctl 0x%08x\n", |
984 | cmd); | 983 | cmd); |
985 | return ret; | 984 | return ret; |
@@ -988,17 +987,11 @@ static int __uvc_v4l2_do_ioctl(struct file *file, | |||
988 | return ret; | 987 | return ret; |
989 | } | 988 | } |
990 | 989 | ||
991 | static int uvc_v4l2_do_ioctl(struct inode *inode, struct file *file, | ||
992 | unsigned int cmd, void *arg) | ||
993 | { | ||
994 | return __uvc_v4l2_do_ioctl(file, cmd, arg); | ||
995 | } | ||
996 | |||
997 | static int uvc_v4l2_ioctl(struct inode *inode, struct file *file, | 990 | static int uvc_v4l2_ioctl(struct inode *inode, struct file *file, |
998 | unsigned int cmd, unsigned long arg) | 991 | unsigned int cmd, unsigned long arg) |
999 | { | 992 | { |
1000 | uvc_trace(UVC_TRACE_CALLS, "uvc_v4l2_ioctl\n"); | 993 | uvc_trace(UVC_TRACE_CALLS, "uvc_v4l2_ioctl\n"); |
1001 | return video_usercopy(inode, file, cmd, arg, uvc_v4l2_do_ioctl); | 994 | return video_usercopy(file, cmd, arg, uvc_v4l2_do_ioctl); |
1002 | } | 995 | } |
1003 | 996 | ||
1004 | static ssize_t uvc_v4l2_read(struct file *file, char __user *data, | 997 | static ssize_t uvc_v4l2_read(struct file *file, char __user *data, |
diff --git a/drivers/media/video/v4l2-ioctl.c b/drivers/media/video/v4l2-ioctl.c index eef5814aebe5..0e648cb3b399 100644 --- a/drivers/media/video/v4l2-ioctl.c +++ b/drivers/media/video/v4l2-ioctl.c | |||
@@ -393,10 +393,8 @@ video_fix_command(unsigned int cmd) | |||
393 | * Obsolete usercopy function - Should be removed soon | 393 | * Obsolete usercopy function - Should be removed soon |
394 | */ | 394 | */ |
395 | int | 395 | int |
396 | video_usercopy(struct inode *inode, struct file *file, | 396 | video_usercopy(struct file *file, unsigned int cmd, unsigned long arg, |
397 | unsigned int cmd, unsigned long arg, | 397 | v4l2_kioctl func) |
398 | int (*func)(struct inode *inode, struct file *file, | ||
399 | unsigned int cmd, void *arg)) | ||
400 | { | 398 | { |
401 | char sbuf[128]; | 399 | char sbuf[128]; |
402 | void *mbuf = NULL; | 400 | void *mbuf = NULL; |
@@ -458,7 +456,7 @@ video_usercopy(struct inode *inode, struct file *file, | |||
458 | } | 456 | } |
459 | 457 | ||
460 | /* call driver */ | 458 | /* call driver */ |
461 | err = func(inode, file, cmd, parg); | 459 | err = func(file, cmd, parg); |
462 | if (err == -ENOIOCTLCMD) | 460 | if (err == -ENOIOCTLCMD) |
463 | err = -EINVAL; | 461 | err = -EINVAL; |
464 | if (is_ext_ctrl) { | 462 | if (is_ext_ctrl) { |
diff --git a/drivers/media/video/vino.c b/drivers/media/video/vino.c index 1efc5f3462c6..a72a361daade 100644 --- a/drivers/media/video/vino.c +++ b/drivers/media/video/vino.c | |||
@@ -4237,8 +4237,7 @@ error: | |||
4237 | return ret; | 4237 | return ret; |
4238 | } | 4238 | } |
4239 | 4239 | ||
4240 | static int vino_do_ioctl(struct inode *inode, struct file *file, | 4240 | static int vino_do_ioctl(struct file *file, unsigned int cmd, void *arg) |
4241 | unsigned int cmd, void *arg) | ||
4242 | { | 4241 | { |
4243 | struct vino_channel_settings *vcs = video_drvdata(file); | 4242 | struct vino_channel_settings *vcs = video_drvdata(file); |
4244 | 4243 | ||
@@ -4353,7 +4352,7 @@ static int vino_ioctl(struct inode *inode, struct file *file, | |||
4353 | if (mutex_lock_interruptible(&vcs->mutex)) | 4352 | if (mutex_lock_interruptible(&vcs->mutex)) |
4354 | return -EINTR; | 4353 | return -EINTR; |
4355 | 4354 | ||
4356 | ret = video_usercopy(inode, file, cmd, arg, vino_do_ioctl); | 4355 | ret = video_usercopy(file, cmd, arg, vino_do_ioctl); |
4357 | 4356 | ||
4358 | mutex_unlock(&vcs->mutex); | 4357 | mutex_unlock(&vcs->mutex); |
4359 | 4358 | ||
diff --git a/drivers/media/video/w9966.c b/drivers/media/video/w9966.c index b2dbe48a92bb..56c570c267ea 100644 --- a/drivers/media/video/w9966.c +++ b/drivers/media/video/w9966.c | |||
@@ -727,8 +727,7 @@ static int w9966_wReg_i2c(struct w9966_dev* cam, int reg, int data) | |||
727 | * Video4linux interfacing | 727 | * Video4linux interfacing |
728 | */ | 728 | */ |
729 | 729 | ||
730 | static int w9966_v4l_do_ioctl(struct inode *inode, struct file *file, | 730 | static int w9966_v4l_do_ioctl(struct file *file, unsigned int cmd, void *arg) |
731 | unsigned int cmd, void *arg) | ||
732 | { | 731 | { |
733 | struct w9966_dev *cam = video_drvdata(file); | 732 | struct w9966_dev *cam = video_drvdata(file); |
734 | 733 | ||
@@ -881,7 +880,7 @@ static int w9966_v4l_do_ioctl(struct inode *inode, struct file *file, | |||
881 | static int w9966_v4l_ioctl(struct inode *inode, struct file *file, | 880 | static int w9966_v4l_ioctl(struct inode *inode, struct file *file, |
882 | unsigned int cmd, unsigned long arg) | 881 | unsigned int cmd, unsigned long arg) |
883 | { | 882 | { |
884 | return video_usercopy(inode, file, cmd, arg, w9966_v4l_do_ioctl); | 883 | return video_usercopy(file, cmd, arg, w9966_v4l_do_ioctl); |
885 | } | 884 | } |
886 | 885 | ||
887 | // Capture data | 886 | // Capture data |
diff --git a/drivers/media/video/zoran/zoran_driver.c b/drivers/media/video/zoran/zoran_driver.c index db11ab9e60da..00b97d97aeaa 100644 --- a/drivers/media/video/zoran/zoran_driver.c +++ b/drivers/media/video/zoran/zoran_driver.c | |||
@@ -1940,11 +1940,7 @@ zoran_set_input (struct zoran *zr, | |||
1940 | * ioctl routine | 1940 | * ioctl routine |
1941 | */ | 1941 | */ |
1942 | 1942 | ||
1943 | static int | 1943 | static int zoran_do_ioctl(struct file *file, unsigned int cmd, void *arg) |
1944 | zoran_do_ioctl (struct inode *inode, | ||
1945 | struct file *file, | ||
1946 | unsigned int cmd, | ||
1947 | void *arg) | ||
1948 | { | 1944 | { |
1949 | struct zoran_fh *fh = file->private_data; | 1945 | struct zoran_fh *fh = file->private_data; |
1950 | struct zoran *zr = fh->zr; | 1946 | struct zoran *zr = fh->zr; |
@@ -4201,7 +4197,7 @@ zoran_ioctl (struct inode *inode, | |||
4201 | unsigned int cmd, | 4197 | unsigned int cmd, |
4202 | unsigned long arg) | 4198 | unsigned long arg) |
4203 | { | 4199 | { |
4204 | return video_usercopy(inode, file, cmd, arg, zoran_do_ioctl); | 4200 | return video_usercopy(file, cmd, arg, zoran_do_ioctl); |
4205 | } | 4201 | } |
4206 | 4202 | ||
4207 | static unsigned int | 4203 | static unsigned int |