diff options
Diffstat (limited to 'drivers/media/video/pwc/pwc-if.c')
-rw-r--r-- | drivers/media/video/pwc/pwc-if.c | 22 |
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 4aa70faaae8c..780af5f81642 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); | |||
151 | static ssize_t pwc_video_read(struct file *file, char __user *buf, | 151 | static ssize_t pwc_video_read(struct file *file, char __user *buf, |
152 | size_t count, loff_t *ppos); | 152 | size_t count, loff_t *ppos); |
153 | static unsigned int pwc_video_poll(struct file *file, poll_table *wait); | 153 | static unsigned int pwc_video_poll(struct file *file, poll_table *wait); |
154 | static long pwc_video_ioctl(struct file *file, | ||
155 | unsigned int ioctlnr, unsigned long arg); | ||
156 | static int pwc_video_mmap(struct file *file, struct vm_area_struct *vma); | 154 | static int pwc_video_mmap(struct file *file, struct vm_area_struct *vma); |
157 | 155 | ||
158 | static const struct v4l2_file_operations pwc_fops = { | 156 | static const struct v4l2_file_operations pwc_fops = { |
@@ -162,7 +160,7 @@ static const struct v4l2_file_operations pwc_fops = { | |||
162 | .read = pwc_video_read, | 160 | .read = pwc_video_read, |
163 | .poll = pwc_video_poll, | 161 | .poll = pwc_video_poll, |
164 | .mmap = pwc_video_mmap, | 162 | .mmap = pwc_video_mmap, |
165 | .unlocked_ioctl = pwc_video_ioctl, | 163 | .unlocked_ioctl = video_ioctl2, |
166 | }; | 164 | }; |
167 | static struct video_device pwc_template = { | 165 | static struct video_device pwc_template = { |
168 | .name = "Philips Webcam", /* Filled in later */ | 166 | .name = "Philips Webcam", /* Filled in later */ |
@@ -1378,23 +1376,6 @@ static unsigned int pwc_video_poll(struct file *file, poll_table *wait) | |||
1378 | return 0; | 1376 | return 0; |
1379 | } | 1377 | } |
1380 | 1378 | ||
1381 | static long pwc_video_ioctl(struct file *file, | ||
1382 | unsigned int cmd, unsigned long arg) | ||
1383 | { | ||
1384 | struct video_device *vdev = file->private_data; | ||
1385 | struct pwc_device *pdev; | ||
1386 | long r = -ENODEV; | ||
1387 | |||
1388 | if (!vdev) | ||
1389 | goto out; | ||
1390 | pdev = video_get_drvdata(vdev); | ||
1391 | |||
1392 | if (!pdev->unplugged) | ||
1393 | r = video_usercopy(file, cmd, arg, pwc_video_do_ioctl); | ||
1394 | out: | ||
1395 | return r; | ||
1396 | } | ||
1397 | |||
1398 | static int pwc_video_mmap(struct file *file, struct vm_area_struct *vma) | 1379 | static int pwc_video_mmap(struct file *file, struct vm_area_struct *vma) |
1399 | { | 1380 | { |
1400 | struct video_device *vdev = file->private_data; | 1381 | 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 | |||
1744 | memcpy(pdev->vdev, &pwc_template, sizeof(pwc_template)); | 1725 | memcpy(pdev->vdev, &pwc_template, sizeof(pwc_template)); |
1745 | pdev->vdev->parent = &intf->dev; | 1726 | pdev->vdev->parent = &intf->dev; |
1746 | pdev->vdev->lock = &pdev->modlock; | 1727 | pdev->vdev->lock = &pdev->modlock; |
1728 | pdev->vdev->ioctl_ops = &pwc_ioctl_ops; | ||
1747 | strcpy(pdev->vdev->name, name); | 1729 | strcpy(pdev->vdev->name, name); |
1748 | video_set_drvdata(pdev->vdev, pdev); | 1730 | video_set_drvdata(pdev->vdev, pdev); |
1749 | 1731 | ||