summaryrefslogtreecommitdiff
path: root/drivers/media/video/pwc/pwc-if.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2011-01-22 09:34:55 (GMT)
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-03-21 23:31:51 (GMT)
commitafa38521614dcdfe12c765ff76d4c137a056e905 (patch)
treeb310db8ca753e2236783edf9db49d915cceed727 /drivers/media/video/pwc/pwc-if.c
parentb577f962d27c055571f72ddd73ae3aded39a6261 (diff)
downloadlinux-fsl-qoriq-afa38521614dcdfe12c765ff76d4c137a056e905.tar.xz
[media] pwc: convert to video_ioctl2
Tested with a Logitech QuickCam Pro 4000. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/pwc/pwc-if.c')
-rw-r--r--drivers/media/video/pwc/pwc-if.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c
index 4aa70fa..780af5f 100644
--- a/drivers/media/video/pwc/pwc-if.c
+++ b/drivers/media/video/pwc/pwc-if.c
@@ -151,8 +151,6 @@ static int pwc_video_close(struct file *file);
static ssize_t pwc_video_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos);
static unsigned int pwc_video_poll(struct file *file, poll_table *wait);
-static long pwc_video_ioctl(struct file *file,
- unsigned int ioctlnr, unsigned long arg);
static int pwc_video_mmap(struct file *file, struct vm_area_struct *vma);
static const struct v4l2_file_operations pwc_fops = {
@@ -162,7 +160,7 @@ static const struct v4l2_file_operations pwc_fops = {
.read = pwc_video_read,
.poll = pwc_video_poll,
.mmap = pwc_video_mmap,
- .unlocked_ioctl = pwc_video_ioctl,
+ .unlocked_ioctl = video_ioctl2,
};
static struct video_device pwc_template = {
.name = "Philips Webcam", /* Filled in later */
@@ -1378,23 +1376,6 @@ static unsigned int pwc_video_poll(struct file *file, poll_table *wait)
return 0;
}
-static long pwc_video_ioctl(struct file *file,
- unsigned int cmd, unsigned long arg)
-{
- struct video_device *vdev = file->private_data;
- struct pwc_device *pdev;
- long r = -ENODEV;
-
- if (!vdev)
- goto out;
- pdev = video_get_drvdata(vdev);
-
- if (!pdev->unplugged)
- r = video_usercopy(file, cmd, arg, pwc_video_do_ioctl);
-out:
- return r;
-}
-
static int pwc_video_mmap(struct file *file, struct vm_area_struct *vma)
{
struct video_device *vdev = file->private_data;
@@ -1744,6 +1725,7 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
memcpy(pdev->vdev, &pwc_template, sizeof(pwc_template));
pdev->vdev->parent = &intf->dev;
pdev->vdev->lock = &pdev->modlock;
+ pdev->vdev->ioctl_ops = &pwc_ioctl_ops;
strcpy(pdev->vdev->name, name);
video_set_drvdata(pdev->vdev, pdev);