diff options
83 files changed, 331 insertions, 572 deletions
diff --git a/drivers/media/common/saa7146_fops.c b/drivers/media/common/saa7146_fops.c index 7d844af88384..fad7fd85e5b6 100644 --- a/drivers/media/common/saa7146_fops.c +++ b/drivers/media/common/saa7146_fops.c | |||
@@ -192,9 +192,9 @@ void saa7146_buffer_timeout(unsigned long data) | |||
192 | /********************************************************************************/ | 192 | /********************************************************************************/ |
193 | /* file operations */ | 193 | /* file operations */ |
194 | 194 | ||
195 | static int fops_open(struct inode *inode, struct file *file) | 195 | static int fops_open(struct file *file) |
196 | { | 196 | { |
197 | unsigned int minor = iminor(inode); | 197 | unsigned int minor = video_devdata(file)->minor; |
198 | struct saa7146_dev *h = NULL, *dev = NULL; | 198 | struct saa7146_dev *h = NULL, *dev = NULL; |
199 | struct list_head *list; | 199 | struct list_head *list; |
200 | struct saa7146_fh *fh = NULL; | 200 | struct saa7146_fh *fh = NULL; |
@@ -202,7 +202,7 @@ static int fops_open(struct inode *inode, struct file *file) | |||
202 | 202 | ||
203 | enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE; | 203 | enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE; |
204 | 204 | ||
205 | DEB_EE(("inode:%p, file:%p, minor:%d\n",inode,file,minor)); | 205 | DEB_EE(("file:%p, minor:%d\n", file, minor)); |
206 | 206 | ||
207 | if (mutex_lock_interruptible(&saa7146_devices_lock)) | 207 | if (mutex_lock_interruptible(&saa7146_devices_lock)) |
208 | return -ERESTARTSYS; | 208 | return -ERESTARTSYS; |
@@ -255,7 +255,7 @@ static int fops_open(struct inode *inode, struct file *file) | |||
255 | if (dev->ext_vv_data->capabilities & V4L2_CAP_VBI_CAPTURE) | 255 | if (dev->ext_vv_data->capabilities & V4L2_CAP_VBI_CAPTURE) |
256 | result = saa7146_vbi_uops.open(dev,file); | 256 | result = saa7146_vbi_uops.open(dev,file); |
257 | if (dev->ext_vv_data->vbi_fops.open) | 257 | if (dev->ext_vv_data->vbi_fops.open) |
258 | dev->ext_vv_data->vbi_fops.open(inode, file); | 258 | dev->ext_vv_data->vbi_fops.open(file); |
259 | } else { | 259 | } else { |
260 | DEB_S(("initializing video...\n")); | 260 | DEB_S(("initializing video...\n")); |
261 | result = saa7146_video_uops.open(dev,file); | 261 | result = saa7146_video_uops.open(dev,file); |
@@ -280,12 +280,12 @@ out: | |||
280 | return result; | 280 | return result; |
281 | } | 281 | } |
282 | 282 | ||
283 | static int fops_release(struct inode *inode, struct file *file) | 283 | static int fops_release(struct file *file) |
284 | { | 284 | { |
285 | struct saa7146_fh *fh = file->private_data; | 285 | struct saa7146_fh *fh = file->private_data; |
286 | struct saa7146_dev *dev = fh->dev; | 286 | struct saa7146_dev *dev = fh->dev; |
287 | 287 | ||
288 | DEB_EE(("inode:%p, file:%p\n",inode,file)); | 288 | DEB_EE(("file:%p\n", file)); |
289 | 289 | ||
290 | if (mutex_lock_interruptible(&saa7146_devices_lock)) | 290 | if (mutex_lock_interruptible(&saa7146_devices_lock)) |
291 | return -ERESTARTSYS; | 291 | return -ERESTARTSYS; |
@@ -294,7 +294,7 @@ static int fops_release(struct inode *inode, struct file *file) | |||
294 | if (dev->ext_vv_data->capabilities & V4L2_CAP_VBI_CAPTURE) | 294 | if (dev->ext_vv_data->capabilities & V4L2_CAP_VBI_CAPTURE) |
295 | saa7146_vbi_uops.release(dev,file); | 295 | saa7146_vbi_uops.release(dev,file); |
296 | if (dev->ext_vv_data->vbi_fops.release) | 296 | if (dev->ext_vv_data->vbi_fops.release) |
297 | dev->ext_vv_data->vbi_fops.release(inode, file); | 297 | dev->ext_vv_data->vbi_fops.release(file); |
298 | } else { | 298 | } else { |
299 | saa7146_video_uops.release(dev,file); | 299 | saa7146_video_uops.release(dev,file); |
300 | } | 300 | } |
@@ -308,10 +308,10 @@ static int fops_release(struct inode *inode, struct file *file) | |||
308 | return 0; | 308 | return 0; |
309 | } | 309 | } |
310 | 310 | ||
311 | static int fops_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) | 311 | static int fops_ioctl(struct file *file, unsigned int cmd, unsigned long arg) |
312 | { | 312 | { |
313 | /* | 313 | /* |
314 | DEB_EE(("inode:%p, file:%p, cmd:%d, arg:%li\n",inode, file, cmd, arg)); | 314 | DEB_EE(("file:%p, cmd:%d, arg:%li\n", file, cmd, arg)); |
315 | */ | 315 | */ |
316 | return video_usercopy(file, cmd, arg, saa7146_video_do_ioctl); | 316 | return video_usercopy(file, cmd, arg, saa7146_video_do_ioctl); |
317 | } | 317 | } |
@@ -416,7 +416,7 @@ static ssize_t fops_write(struct file *file, const char __user *data, size_t cou | |||
416 | } | 416 | } |
417 | } | 417 | } |
418 | 418 | ||
419 | static const struct file_operations video_fops = | 419 | static const struct v4l2_file_operations video_fops = |
420 | { | 420 | { |
421 | .owner = THIS_MODULE, | 421 | .owner = THIS_MODULE, |
422 | .open = fops_open, | 422 | .open = fops_open, |
@@ -426,7 +426,6 @@ static const struct file_operations video_fops = | |||
426 | .poll = fops_poll, | 426 | .poll = fops_poll, |
427 | .mmap = fops_mmap, | 427 | .mmap = fops_mmap, |
428 | .ioctl = fops_ioctl, | 428 | .ioctl = fops_ioctl, |
429 | .llseek = no_llseek, | ||
430 | }; | 429 | }; |
431 | 430 | ||
432 | static void vv_callback(struct saa7146_dev *dev, unsigned long status) | 431 | static void vv_callback(struct saa7146_dev *dev, unsigned long status) |
diff --git a/drivers/media/dvb/ttpci/av7110_v4l.c b/drivers/media/dvb/ttpci/av7110_v4l.c index b4a0cc5dc935..315ba6fa0134 100644 --- a/drivers/media/dvb/ttpci/av7110_v4l.c +++ b/drivers/media/dvb/ttpci/av7110_v4l.c | |||
@@ -567,7 +567,7 @@ static int av7110_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) | |||
567 | return 0; | 567 | return 0; |
568 | } | 568 | } |
569 | 569 | ||
570 | static int av7110_vbi_reset(struct inode *inode, struct file *file) | 570 | static int av7110_vbi_reset(struct file *file) |
571 | { | 571 | { |
572 | struct saa7146_fh *fh = file->private_data; | 572 | struct saa7146_fh *fh = file->private_data; |
573 | struct saa7146_dev *dev = fh->dev; | 573 | struct saa7146_dev *dev = fh->dev; |
diff --git a/drivers/media/radio/dsbr100.c b/drivers/media/radio/dsbr100.c index 5474a22c1b22..2014ebc4e984 100644 --- a/drivers/media/radio/dsbr100.c +++ b/drivers/media/radio/dsbr100.c | |||
@@ -154,8 +154,8 @@ devices, that would be 76 and 91. */ | |||
154 | static int usb_dsbr100_probe(struct usb_interface *intf, | 154 | static int usb_dsbr100_probe(struct usb_interface *intf, |
155 | const struct usb_device_id *id); | 155 | const struct usb_device_id *id); |
156 | static void usb_dsbr100_disconnect(struct usb_interface *intf); | 156 | static void usb_dsbr100_disconnect(struct usb_interface *intf); |
157 | static int usb_dsbr100_open(struct inode *inode, struct file *file); | 157 | static int usb_dsbr100_open(struct file *file); |
158 | static int usb_dsbr100_close(struct inode *inode, struct file *file); | 158 | static int usb_dsbr100_close(struct file *file); |
159 | static int usb_dsbr100_suspend(struct usb_interface *intf, | 159 | static int usb_dsbr100_suspend(struct usb_interface *intf, |
160 | pm_message_t message); | 160 | pm_message_t message); |
161 | static int usb_dsbr100_resume(struct usb_interface *intf); | 161 | static int usb_dsbr100_resume(struct usb_interface *intf); |
@@ -566,7 +566,7 @@ static int vidioc_s_audio(struct file *file, void *priv, | |||
566 | return 0; | 566 | return 0; |
567 | } | 567 | } |
568 | 568 | ||
569 | static int usb_dsbr100_open(struct inode *inode, struct file *file) | 569 | static int usb_dsbr100_open(struct file *file) |
570 | { | 570 | { |
571 | struct dsbr100_device *radio = video_drvdata(file); | 571 | struct dsbr100_device *radio = video_drvdata(file); |
572 | int retval; | 572 | int retval; |
@@ -593,7 +593,7 @@ static int usb_dsbr100_open(struct inode *inode, struct file *file) | |||
593 | return 0; | 593 | return 0; |
594 | } | 594 | } |
595 | 595 | ||
596 | static int usb_dsbr100_close(struct inode *inode, struct file *file) | 596 | static int usb_dsbr100_close(struct file *file) |
597 | { | 597 | { |
598 | struct dsbr100_device *radio = video_drvdata(file); | 598 | struct dsbr100_device *radio = video_drvdata(file); |
599 | int retval; | 599 | int retval; |
@@ -653,15 +653,11 @@ static void usb_dsbr100_video_device_release(struct video_device *videodev) | |||
653 | } | 653 | } |
654 | 654 | ||
655 | /* File system interface */ | 655 | /* File system interface */ |
656 | static const struct file_operations usb_dsbr100_fops = { | 656 | static const struct v4l2_file_operations usb_dsbr100_fops = { |
657 | .owner = THIS_MODULE, | 657 | .owner = THIS_MODULE, |
658 | .open = usb_dsbr100_open, | 658 | .open = usb_dsbr100_open, |
659 | .release = usb_dsbr100_close, | 659 | .release = usb_dsbr100_close, |
660 | .ioctl = video_ioctl2, | 660 | .ioctl = video_ioctl2, |
661 | #ifdef CONFIG_COMPAT | ||
662 | .compat_ioctl = v4l_compat_ioctl32, | ||
663 | #endif | ||
664 | .llseek = no_llseek, | ||
665 | }; | 661 | }; |
666 | 662 | ||
667 | static const struct v4l2_ioctl_ops usb_dsbr100_ioctl_ops = { | 663 | static const struct v4l2_ioctl_ops usb_dsbr100_ioctl_ops = { |
diff --git a/drivers/media/radio/radio-aimslab.c b/drivers/media/radio/radio-aimslab.c index dd6d3dfcd7d2..bfa13b8b3043 100644 --- a/drivers/media/radio/radio-aimslab.c +++ b/drivers/media/radio/radio-aimslab.c | |||
@@ -374,26 +374,22 @@ static int vidioc_s_audio(struct file *file, void *priv, | |||
374 | 374 | ||
375 | static struct rt_device rtrack_unit; | 375 | static struct rt_device rtrack_unit; |
376 | 376 | ||
377 | static int rtrack_exclusive_open(struct inode *inode, struct file *file) | 377 | static int rtrack_exclusive_open(struct file *file) |
378 | { | 378 | { |
379 | return test_and_set_bit(0, &rtrack_unit.in_use) ? -EBUSY : 0; | 379 | return test_and_set_bit(0, &rtrack_unit.in_use) ? -EBUSY : 0; |
380 | } | 380 | } |
381 | 381 | ||
382 | static int rtrack_exclusive_release(struct inode *inode, struct file *file) | 382 | static int rtrack_exclusive_release(struct file *file) |
383 | { | 383 | { |
384 | clear_bit(0, &rtrack_unit.in_use); | 384 | clear_bit(0, &rtrack_unit.in_use); |
385 | return 0; | 385 | return 0; |
386 | } | 386 | } |
387 | 387 | ||
388 | static const struct file_operations rtrack_fops = { | 388 | static const struct v4l2_file_operations rtrack_fops = { |
389 | .owner = THIS_MODULE, | 389 | .owner = THIS_MODULE, |
390 | .open = rtrack_exclusive_open, | 390 | .open = rtrack_exclusive_open, |
391 | .release = rtrack_exclusive_release, | 391 | .release = rtrack_exclusive_release, |
392 | .ioctl = video_ioctl2, | 392 | .ioctl = video_ioctl2, |
393 | #ifdef CONFIG_COMPAT | ||
394 | .compat_ioctl = v4l_compat_ioctl32, | ||
395 | #endif | ||
396 | .llseek = no_llseek, | ||
397 | }; | 393 | }; |
398 | 394 | ||
399 | static const struct v4l2_ioctl_ops rtrack_ioctl_ops = { | 395 | static const struct v4l2_ioctl_ops rtrack_ioctl_ops = { |
diff --git a/drivers/media/radio/radio-aztech.c b/drivers/media/radio/radio-aztech.c index d78489573230..5604e881e96c 100644 --- a/drivers/media/radio/radio-aztech.c +++ b/drivers/media/radio/radio-aztech.c | |||
@@ -338,26 +338,22 @@ static int vidioc_s_ctrl (struct file *file, void *priv, | |||
338 | 338 | ||
339 | static struct az_device aztech_unit; | 339 | static struct az_device aztech_unit; |
340 | 340 | ||
341 | static int aztech_exclusive_open(struct inode *inode, struct file *file) | 341 | static int aztech_exclusive_open(struct file *file) |
342 | { | 342 | { |
343 | return test_and_set_bit(0, &aztech_unit.in_use) ? -EBUSY : 0; | 343 | return test_and_set_bit(0, &aztech_unit.in_use) ? -EBUSY : 0; |
344 | } | 344 | } |
345 | 345 | ||
346 | static int aztech_exclusive_release(struct inode *inode, struct file *file) | 346 | static int aztech_exclusive_release(struct file *file) |
347 | { | 347 | { |
348 | clear_bit(0, &aztech_unit.in_use); | 348 | clear_bit(0, &aztech_unit.in_use); |
349 | return 0; | 349 | return 0; |
350 | } | 350 | } |
351 | 351 | ||
352 | static const struct file_operations aztech_fops = { | 352 | static const struct v4l2_file_operations aztech_fops = { |
353 | .owner = THIS_MODULE, | 353 | .owner = THIS_MODULE, |
354 | .open = aztech_exclusive_open, | 354 | .open = aztech_exclusive_open, |
355 | .release = aztech_exclusive_release, | 355 | .release = aztech_exclusive_release, |
356 | .ioctl = video_ioctl2, | 356 | .ioctl = video_ioctl2, |
357 | #ifdef CONFIG_COMPAT | ||
358 | .compat_ioctl = v4l_compat_ioctl32, | ||
359 | #endif | ||
360 | .llseek = no_llseek, | ||
361 | }; | 357 | }; |
362 | 358 | ||
363 | static const struct v4l2_ioctl_ops aztech_ioctl_ops = { | 359 | static const struct v4l2_ioctl_ops aztech_ioctl_ops = { |
diff --git a/drivers/media/radio/radio-cadet.c b/drivers/media/radio/radio-cadet.c index bfd37f38b9ab..cb3075ac104c 100644 --- a/drivers/media/radio/radio-cadet.c +++ b/drivers/media/radio/radio-cadet.c | |||
@@ -529,7 +529,7 @@ static int vidioc_s_audio(struct file *file, void *priv, | |||
529 | } | 529 | } |
530 | 530 | ||
531 | static int | 531 | static int |
532 | cadet_open(struct inode *inode, struct file *file) | 532 | cadet_open(struct file *file) |
533 | { | 533 | { |
534 | users++; | 534 | users++; |
535 | if (1 == users) init_waitqueue_head(&read_queue); | 535 | if (1 == users) init_waitqueue_head(&read_queue); |
@@ -537,7 +537,7 @@ cadet_open(struct inode *inode, struct file *file) | |||
537 | } | 537 | } |
538 | 538 | ||
539 | static int | 539 | static int |
540 | cadet_release(struct inode *inode, struct file *file) | 540 | cadet_release(struct file *file) |
541 | { | 541 | { |
542 | users--; | 542 | users--; |
543 | if (0 == users){ | 543 | if (0 == users){ |
@@ -557,17 +557,13 @@ cadet_poll(struct file *file, struct poll_table_struct *wait) | |||
557 | } | 557 | } |
558 | 558 | ||
559 | 559 | ||
560 | static const struct file_operations cadet_fops = { | 560 | static const struct v4l2_file_operations cadet_fops = { |
561 | .owner = THIS_MODULE, | 561 | .owner = THIS_MODULE, |
562 | .open = cadet_open, | 562 | .open = cadet_open, |
563 | .release = cadet_release, | 563 | .release = cadet_release, |
564 | .read = cadet_read, | 564 | .read = cadet_read, |
565 | .ioctl = video_ioctl2, | 565 | .ioctl = video_ioctl2, |
566 | .poll = cadet_poll, | 566 | .poll = cadet_poll, |
567 | #ifdef CONFIG_COMPAT | ||
568 | .compat_ioctl = v4l_compat_ioctl32, | ||
569 | #endif | ||
570 | .llseek = no_llseek, | ||
571 | }; | 567 | }; |
572 | 568 | ||
573 | static const struct v4l2_ioctl_ops cadet_ioctl_ops = { | 569 | static const struct v4l2_ioctl_ops cadet_ioctl_ops = { |
diff --git a/drivers/media/radio/radio-gemtek-pci.c b/drivers/media/radio/radio-gemtek-pci.c index e15bee6d7cfc..0c96bf8525b0 100644 --- a/drivers/media/radio/radio-gemtek-pci.c +++ b/drivers/media/radio/radio-gemtek-pci.c | |||
@@ -358,26 +358,22 @@ MODULE_DEVICE_TABLE( pci, gemtek_pci_id ); | |||
358 | 358 | ||
359 | static int mx = 1; | 359 | static int mx = 1; |
360 | 360 | ||
361 | static int gemtek_pci_exclusive_open(struct inode *inode, struct file *file) | 361 | static int gemtek_pci_exclusive_open(struct file *file) |
362 | { | 362 | { |
363 | return test_and_set_bit(0, &in_use) ? -EBUSY : 0; | 363 | return test_and_set_bit(0, &in_use) ? -EBUSY : 0; |
364 | } | 364 | } |
365 | 365 | ||
366 | static int gemtek_pci_exclusive_release(struct inode *inode, struct file *file) | 366 | static int gemtek_pci_exclusive_release(struct file *file) |
367 | { | 367 | { |
368 | clear_bit(0, &in_use); | 368 | clear_bit(0, &in_use); |
369 | return 0; | 369 | return 0; |
370 | } | 370 | } |
371 | 371 | ||
372 | static const struct file_operations gemtek_pci_fops = { | 372 | static const struct v4l2_file_operations gemtek_pci_fops = { |
373 | .owner = THIS_MODULE, | 373 | .owner = THIS_MODULE, |
374 | .open = gemtek_pci_exclusive_open, | 374 | .open = gemtek_pci_exclusive_open, |
375 | .release = gemtek_pci_exclusive_release, | 375 | .release = gemtek_pci_exclusive_release, |
376 | .ioctl = video_ioctl2, | 376 | .ioctl = video_ioctl2, |
377 | #ifdef CONFIG_COMPAT | ||
378 | .compat_ioctl = v4l_compat_ioctl32, | ||
379 | #endif | ||
380 | .llseek = no_llseek, | ||
381 | }; | 377 | }; |
382 | 378 | ||
383 | static const struct v4l2_ioctl_ops gemtek_pci_ioctl_ops = { | 379 | static const struct v4l2_ioctl_ops gemtek_pci_ioctl_ops = { |
diff --git a/drivers/media/radio/radio-gemtek.c b/drivers/media/radio/radio-gemtek.c index e13118da307b..2b68be773f13 100644 --- a/drivers/media/radio/radio-gemtek.c +++ b/drivers/media/radio/radio-gemtek.c | |||
@@ -394,26 +394,22 @@ static struct v4l2_queryctrl radio_qctrl[] = { | |||
394 | } | 394 | } |
395 | }; | 395 | }; |
396 | 396 | ||
397 | static int gemtek_exclusive_open(struct inode *inode, struct file *file) | 397 | static int gemtek_exclusive_open(struct file *file) |
398 | { | 398 | { |
399 | return test_and_set_bit(0, &in_use) ? -EBUSY : 0; | 399 | return test_and_set_bit(0, &in_use) ? -EBUSY : 0; |
400 | } | 400 | } |
401 | 401 | ||
402 | static int gemtek_exclusive_release(struct inode *inode, struct file *file) | 402 | static int gemtek_exclusive_release(struct file *file) |
403 | { | 403 | { |
404 | clear_bit(0, &in_use); | 404 | clear_bit(0, &in_use); |
405 | return 0; | 405 | return 0; |
406 | } | 406 | } |
407 | 407 | ||
408 | static const struct file_operations gemtek_fops = { | 408 | static const struct v4l2_file_operations gemtek_fops = { |
409 | .owner = THIS_MODULE, | 409 | .owner = THIS_MODULE, |
410 | .open = gemtek_exclusive_open, | 410 | .open = gemtek_exclusive_open, |
411 | .release = gemtek_exclusive_release, | 411 | .release = gemtek_exclusive_release, |
412 | .ioctl = video_ioctl2, | 412 | .ioctl = video_ioctl2, |
413 | #ifdef CONFIG_COMPAT | ||
414 | .compat_ioctl = v4l_compat_ioctl32, | ||
415 | #endif | ||
416 | .llseek = no_llseek | ||
417 | }; | 413 | }; |
418 | 414 | ||
419 | static int vidioc_querycap(struct file *file, void *priv, | 415 | static int vidioc_querycap(struct file *file, void *priv, |
diff --git a/drivers/media/radio/radio-maestro.c b/drivers/media/radio/radio-maestro.c index 4bf4d007bcfa..ba3a13a90013 100644 --- a/drivers/media/radio/radio-maestro.c +++ b/drivers/media/radio/radio-maestro.c | |||
@@ -79,12 +79,12 @@ static unsigned long in_use; | |||
79 | 79 | ||
80 | static int maestro_probe(struct pci_dev *pdev, const struct pci_device_id *ent); | 80 | static int maestro_probe(struct pci_dev *pdev, const struct pci_device_id *ent); |
81 | 81 | ||
82 | static int maestro_exclusive_open(struct inode *inode, struct file *file) | 82 | static int maestro_exclusive_open(struct file *file) |
83 | { | 83 | { |
84 | return test_and_set_bit(0, &in_use) ? -EBUSY : 0; | 84 | return test_and_set_bit(0, &in_use) ? -EBUSY : 0; |
85 | } | 85 | } |
86 | 86 | ||
87 | static int maestro_exclusive_release(struct inode *inode, struct file *file) | 87 | static int maestro_exclusive_release(struct file *file) |
88 | { | 88 | { |
89 | clear_bit(0, &in_use); | 89 | clear_bit(0, &in_use); |
90 | return 0; | 90 | return 0; |
@@ -110,15 +110,11 @@ static struct pci_driver maestro_r_driver = { | |||
110 | .remove = __devexit_p(maestro_remove), | 110 | .remove = __devexit_p(maestro_remove), |
111 | }; | 111 | }; |
112 | 112 | ||
113 | static const struct file_operations maestro_fops = { | 113 | static const struct v4l2_file_operations maestro_fops = { |
114 | .owner = THIS_MODULE, | 114 | .owner = THIS_MODULE, |
115 | .open = maestro_exclusive_open, | 115 | .open = maestro_exclusive_open, |
116 | .release = maestro_exclusive_release, | 116 | .release = maestro_exclusive_release, |
117 | .ioctl = video_ioctl2, | 117 | .ioctl = video_ioctl2, |
118 | #ifdef CONFIG_COMPAT | ||
119 | .compat_ioctl = v4l_compat_ioctl32, | ||
120 | #endif | ||
121 | .llseek = no_llseek, | ||
122 | }; | 118 | }; |
123 | 119 | ||
124 | struct radio_device { | 120 | struct radio_device { |
diff --git a/drivers/media/radio/radio-maxiradio.c b/drivers/media/radio/radio-maxiradio.c index c777a17b00bc..c5dc00aa9c9f 100644 --- a/drivers/media/radio/radio-maxiradio.c +++ b/drivers/media/radio/radio-maxiradio.c | |||
@@ -100,26 +100,22 @@ static unsigned long in_use; | |||
100 | #define BITS2FREQ(x) ((x) * FREQ_STEP - FREQ_IF) | 100 | #define BITS2FREQ(x) ((x) * FREQ_STEP - FREQ_IF) |
101 | 101 | ||
102 | 102 | ||
103 | static int maxiradio_exclusive_open(struct inode *inode, struct file *file) | 103 | static int maxiradio_exclusive_open(struct file *file) |
104 | { | 104 | { |
105 | return test_and_set_bit(0, &in_use) ? -EBUSY : 0; | 105 | return test_and_set_bit(0, &in_use) ? -EBUSY : 0; |
106 | } | 106 | } |
107 | 107 | ||
108 | static int maxiradio_exclusive_release(struct inode *inode, struct file *file) | 108 | static int maxiradio_exclusive_release(struct file *file) |
109 | { | 109 | { |
110 | clear_bit(0, &in_use); | 110 | clear_bit(0, &in_use); |
111 | return 0; | 111 | return 0; |
112 | } | 112 | } |
113 | 113 | ||
114 | static const struct file_operations maxiradio_fops = { | 114 | static const struct v4l2_file_operations maxiradio_fops = { |
115 | .owner = THIS_MODULE, | 115 | .owner = THIS_MODULE, |
116 | .open = maxiradio_exclusive_open, | 116 | .open = maxiradio_exclusive_open, |
117 | .release = maxiradio_exclusive_release, | 117 | .release = maxiradio_exclusive_release, |
118 | .ioctl = video_ioctl2, | 118 | .ioctl = video_ioctl2, |
119 | #ifdef CONFIG_COMPAT | ||
120 | .compat_ioctl = v4l_compat_ioctl32, | ||
121 | #endif | ||
122 | .llseek = no_llseek, | ||
123 | }; | 119 | }; |
124 | 120 | ||
125 | static struct radio_device | 121 | static struct radio_device |
diff --git a/drivers/media/radio/radio-mr800.c b/drivers/media/radio/radio-mr800.c index e730eddb2bb5..0747dc8862b0 100644 --- a/drivers/media/radio/radio-mr800.c +++ b/drivers/media/radio/radio-mr800.c | |||
@@ -127,8 +127,8 @@ static struct v4l2_queryctrl radio_qctrl[] = { | |||
127 | static int usb_amradio_probe(struct usb_interface *intf, | 127 | static int usb_amradio_probe(struct usb_interface *intf, |
128 | const struct usb_device_id *id); | 128 | const struct usb_device_id *id); |
129 | static void usb_amradio_disconnect(struct usb_interface *intf); | 129 | static void usb_amradio_disconnect(struct usb_interface *intf); |
130 | static int usb_amradio_open(struct inode *inode, struct file *file); | 130 | static int usb_amradio_open(struct file *file); |
131 | static int usb_amradio_close(struct inode *inode, struct file *file); | 131 | static int usb_amradio_close(struct file *file); |
132 | static int usb_amradio_suspend(struct usb_interface *intf, | 132 | static int usb_amradio_suspend(struct usb_interface *intf, |
133 | pm_message_t message); | 133 | pm_message_t message); |
134 | static int usb_amradio_resume(struct usb_interface *intf); | 134 | static int usb_amradio_resume(struct usb_interface *intf); |
@@ -500,7 +500,7 @@ static int vidioc_s_input(struct file *filp, void *priv, unsigned int i) | |||
500 | } | 500 | } |
501 | 501 | ||
502 | /* open device - amradio_start() and amradio_setfreq() */ | 502 | /* open device - amradio_start() and amradio_setfreq() */ |
503 | static int usb_amradio_open(struct inode *inode, struct file *file) | 503 | static int usb_amradio_open(struct file *file) |
504 | { | 504 | { |
505 | struct amradio_device *radio = video_get_drvdata(video_devdata(file)); | 505 | struct amradio_device *radio = video_get_drvdata(video_devdata(file)); |
506 | 506 | ||
@@ -525,7 +525,7 @@ static int usb_amradio_open(struct inode *inode, struct file *file) | |||
525 | } | 525 | } |
526 | 526 | ||
527 | /*close device */ | 527 | /*close device */ |
528 | static int usb_amradio_close(struct inode *inode, struct file *file) | 528 | static int usb_amradio_close(struct file *file) |
529 | { | 529 | { |
530 | struct amradio_device *radio = video_get_drvdata(video_devdata(file)); | 530 | struct amradio_device *radio = video_get_drvdata(video_devdata(file)); |
531 | int retval; | 531 | int retval; |
@@ -572,15 +572,11 @@ static int usb_amradio_resume(struct usb_interface *intf) | |||
572 | } | 572 | } |
573 | 573 | ||
574 | /* File system interface */ | 574 | /* File system interface */ |
575 | static const struct file_operations usb_amradio_fops = { | 575 | static const struct v4l2_file_operations usb_amradio_fops = { |
576 | .owner = THIS_MODULE, | 576 | .owner = THIS_MODULE, |
577 | .open = usb_amradio_open, | 577 | .open = usb_amradio_open, |
578 | .release = usb_amradio_close, | 578 | .release = usb_amradio_close, |
579 | .ioctl = video_ioctl2, | 579 | .ioctl = video_ioctl2, |
580 | #ifdef CONFIG_COMPAT | ||
581 | .compat_ioctl = v4l_compat_ioctl32, | ||
582 | #endif | ||
583 | .llseek = no_llseek, | ||
584 | }; | 580 | }; |
585 | 581 | ||
586 | static const struct v4l2_ioctl_ops usb_amradio_ioctl_ops = { | 582 | static const struct v4l2_ioctl_ops usb_amradio_ioctl_ops = { |
diff --git a/drivers/media/radio/radio-rtrack2.c b/drivers/media/radio/radio-rtrack2.c index 7704f243b6f0..2587227214bf 100644 --- a/drivers/media/radio/radio-rtrack2.c +++ b/drivers/media/radio/radio-rtrack2.c | |||
@@ -280,26 +280,22 @@ static int vidioc_s_audio(struct file *file, void *priv, | |||
280 | 280 | ||
281 | static struct rt_device rtrack2_unit; | 281 | static struct rt_device rtrack2_unit; |
282 | 282 | ||
283 | static int rtrack2_exclusive_open(struct inode *inode, struct file *file) | 283 | static int rtrack2_exclusive_open(struct file *file) |
284 | { | 284 | { |
285 | return test_and_set_bit(0, &rtrack2_unit.in_use) ? -EBUSY : 0; | 285 | return test_and_set_bit(0, &rtrack2_unit.in_use) ? -EBUSY : 0; |
286 | } | 286 | } |
287 | 287 | ||
288 | static int rtrack2_exclusive_release(struct inode *inode, struct file *file) | 288 | static int rtrack2_exclusive_release(struct file *file) |
289 | { | 289 | { |
290 | clear_bit(0, &rtrack2_unit.in_use); | 290 | clear_bit(0, &rtrack2_unit.in_use); |
291 | return 0; | 291 | return 0; |
292 | } | 292 | } |
293 | 293 | ||
294 | static const struct file_operations rtrack2_fops = { | 294 | static const struct v4l2_file_operations rtrack2_fops = { |
295 | .owner = THIS_MODULE, | 295 | .owner = THIS_MODULE, |
296 | .open = rtrack2_exclusive_open, | 296 | .open = rtrack2_exclusive_open, |
297 | .release = rtrack2_exclusive_release, | 297 | .release = rtrack2_exclusive_release, |
298 | .ioctl = video_ioctl2, | 298 | .ioctl = video_ioctl2, |
299 | #ifdef CONFIG_COMPAT | ||
300 | .compat_ioctl = v4l_compat_ioctl32, | ||
301 | #endif | ||
302 | .llseek = no_llseek, | ||
303 | }; | 299 | }; |
304 | 300 | ||
305 | static const struct v4l2_ioctl_ops rtrack2_ioctl_ops = { | 301 | static const struct v4l2_ioctl_ops rtrack2_ioctl_ops = { |
diff --git a/drivers/media/radio/radio-sf16fmi.c b/drivers/media/radio/radio-sf16fmi.c index 834d43651c70..d358e48c2422 100644 --- a/drivers/media/radio/radio-sf16fmi.c +++ b/drivers/media/radio/radio-sf16fmi.c | |||
@@ -280,26 +280,22 @@ static int vidioc_s_audio(struct file *file, void *priv, | |||
280 | 280 | ||
281 | static struct fmi_device fmi_unit; | 281 | static struct fmi_device fmi_unit; |
282 | 282 | ||
283 | static int fmi_exclusive_open(struct inode *inode, struct file *file) | 283 | static int fmi_exclusive_open(struct file *file) |
284 | { | 284 | { |
285 | return test_and_set_bit(0, &fmi_unit.in_use) ? -EBUSY : 0; | 285 | return test_and_set_bit(0, &fmi_unit.in_use) ? -EBUSY : 0; |
286 | } | 286 | } |
287 | 287 | ||
288 | static int fmi_exclusive_release(struct inode *inode, struct file *file) | 288 | static int fmi_exclusive_release(struct file *file) |
289 | { | 289 | { |
290 | clear_bit(0, &fmi_unit.in_use); | 290 | clear_bit(0, &fmi_unit.in_use); |
291 | return 0; | 291 | return 0; |
292 | } | 292 | } |
293 | 293 | ||
294 | static const struct file_operations fmi_fops = { | 294 | static const struct v4l2_file_operations fmi_fops = { |
295 | .owner = THIS_MODULE, | 295 | .owner = THIS_MODULE, |
296 | .open = fmi_exclusive_open, | 296 | .open = fmi_exclusive_open, |
297 | .release = fmi_exclusive_release, | 297 | .release = fmi_exclusive_release, |
298 | .ioctl = video_ioctl2, | 298 | .ioctl = video_ioctl2, |
299 | #ifdef CONFIG_COMPAT | ||
300 | .compat_ioctl = v4l_compat_ioctl32, | ||
301 | #endif | ||
302 | .llseek = no_llseek, | ||
303 | }; | 299 | }; |
304 | 300 | ||
305 | static const struct v4l2_ioctl_ops fmi_ioctl_ops = { | 301 | static const struct v4l2_ioctl_ops fmi_ioctl_ops = { |
diff --git a/drivers/media/radio/radio-sf16fmr2.c b/drivers/media/radio/radio-sf16fmr2.c index b1f47c322e02..92f17a347fa7 100644 --- a/drivers/media/radio/radio-sf16fmr2.c +++ b/drivers/media/radio/radio-sf16fmr2.c | |||
@@ -396,26 +396,22 @@ static int vidioc_s_audio(struct file *file, void *priv, | |||
396 | 396 | ||
397 | static struct fmr2_device fmr2_unit; | 397 | static struct fmr2_device fmr2_unit; |
398 | 398 | ||
399 | static int fmr2_exclusive_open(struct inode *inode, struct file *file) | 399 | static int fmr2_exclusive_open(struct file *file) |
400 | { | 400 | { |
401 | return test_and_set_bit(0, &fmr2_unit.in_use) ? -EBUSY : 0; | 401 | return test_and_set_bit(0, &fmr2_unit.in_use) ? -EBUSY : 0; |
402 | } | 402 | } |
403 | 403 | ||
404 | static int fmr2_exclusive_release(struct inode *inode, struct file *file) | 404 | static int fmr2_exclusive_release(struct file *file) |
405 | { | 405 | { |
406 | clear_bit(0, &fmr2_unit.in_use); | 406 | clear_bit(0, &fmr2_unit.in_use); |
407 | return 0; | 407 | return 0; |
408 | } | 408 | } |
409 | 409 | ||
410 | static const struct file_operations fmr2_fops = { | 410 | static const struct v4l2_file_operations fmr2_fops = { |
411 | .owner = THIS_MODULE, | 411 | .owner = THIS_MODULE, |
412 | .open = fmr2_exclusive_open, | 412 | .open = fmr2_exclusive_open, |
413 | .release = fmr2_exclusive_release, | 413 | .release = fmr2_exclusive_release, |
414 | .ioctl = video_ioctl2, | 414 | .ioctl = video_ioctl2, |
415 | #ifdef CONFIG_COMPAT | ||
416 | .compat_ioctl = v4l_compat_ioctl32, | ||
417 | #endif | ||
418 | .llseek = no_llseek, | ||
419 | }; | 415 | }; |
420 | 416 | ||
421 | static const struct v4l2_ioctl_ops fmr2_ioctl_ops = { | 417 | static const struct v4l2_ioctl_ops fmr2_ioctl_ops = { |
diff --git a/drivers/media/radio/radio-si470x.c b/drivers/media/radio/radio-si470x.c index 3e1830293de5..457445ec7b52 100644 --- a/drivers/media/radio/radio-si470x.c +++ b/drivers/media/radio/radio-si470x.c | |||
@@ -1075,7 +1075,7 @@ static unsigned int si470x_fops_poll(struct file *file, | |||
1075 | /* | 1075 | /* |
1076 | * si470x_fops_open - file open | 1076 | * si470x_fops_open - file open |
1077 | */ | 1077 | */ |
1078 | static int si470x_fops_open(struct inode *inode, struct file *file) | 1078 | static int si470x_fops_open(struct file *file) |
1079 | { | 1079 | { |
1080 | struct si470x_device *radio = video_drvdata(file); | 1080 | struct si470x_device *radio = video_drvdata(file); |
1081 | int retval; | 1081 | int retval; |
@@ -1105,7 +1105,7 @@ done: | |||
1105 | /* | 1105 | /* |
1106 | * si470x_fops_release - file release | 1106 | * si470x_fops_release - file release |
1107 | */ | 1107 | */ |
1108 | static int si470x_fops_release(struct inode *inode, struct file *file) | 1108 | static int si470x_fops_release(struct file *file) |
1109 | { | 1109 | { |
1110 | struct si470x_device *radio = video_drvdata(file); | 1110 | struct si470x_device *radio = video_drvdata(file); |
1111 | int retval = 0; | 1111 | int retval = 0; |
@@ -1147,15 +1147,11 @@ done: | |||
1147 | /* | 1147 | /* |
1148 | * si470x_fops - file operations interface | 1148 | * si470x_fops - file operations interface |
1149 | */ | 1149 | */ |
1150 | static const struct file_operations si470x_fops = { | 1150 | static const struct v4l2_file_operations si470x_fops = { |
1151 | .owner = THIS_MODULE, | 1151 | .owner = THIS_MODULE, |
1152 | .llseek = no_llseek, | ||
1153 | .read = si470x_fops_read, | 1152 | .read = si470x_fops_read, |
1154 | .poll = si470x_fops_poll, | 1153 | .poll = si470x_fops_poll, |
1155 | .ioctl = video_ioctl2, | 1154 | .ioctl = video_ioctl2, |
1156 | #ifdef CONFIG_COMPAT | ||
1157 | .compat_ioctl = v4l_compat_ioctl32, | ||
1158 | #endif | ||
1159 | .open = si470x_fops_open, | 1155 | .open = si470x_fops_open, |
1160 | .release = si470x_fops_release, | 1156 | .release = si470x_fops_release, |
1161 | }; | 1157 | }; |
diff --git a/drivers/media/radio/radio-terratec.c b/drivers/media/radio/radio-terratec.c index 0abb186a9473..0798d71abd00 100644 --- a/drivers/media/radio/radio-terratec.c +++ b/drivers/media/radio/radio-terratec.c | |||
@@ -352,26 +352,22 @@ static int vidioc_s_audio(struct file *file, void *priv, | |||
352 | 352 | ||
353 | static struct tt_device terratec_unit; | 353 | static struct tt_device terratec_unit; |
354 | 354 | ||
355 | static int terratec_exclusive_open(struct inode *inode, struct file *file) | 355 | static int terratec_exclusive_open(struct file *file) |
356 | { | 356 | { |
357 | return test_and_set_bit(0, &terratec_unit.in_use) ? -EBUSY : 0; | 357 | return test_and_set_bit(0, &terratec_unit.in_use) ? -EBUSY : 0; |
358 | } | 358 | } |
359 | 359 | ||
360 | static int terratec_exclusive_release(struct inode *inode, struct file *file) | 360 | static int terratec_exclusive_release(struct file *file) |
361 | { | 361 | { |
362 | clear_bit(0, &terratec_unit.in_use); | 362 | clear_bit(0, &terratec_unit.in_use); |
363 | return 0; | 363 | return 0; |
364 | } | 364 | } |
365 | 365 | ||
366 | static const struct file_operations terratec_fops = { | 366 | static const struct v4l2_file_operations terratec_fops = { |
367 | .owner = THIS_MODULE, | 367 | .owner = THIS_MODULE, |
368 | .open = terratec_exclusive_open, | 368 | .open = terratec_exclusive_open, |
369 | .release = terratec_exclusive_release, | 369 | .release = terratec_exclusive_release, |
370 | .ioctl = video_ioctl2, | 370 | .ioctl = video_ioctl2, |
371 | #ifdef CONFIG_COMPAT | ||
372 | .compat_ioctl = v4l_compat_ioctl32, | ||
373 | #endif | ||
374 | .llseek = no_llseek, | ||
375 | }; | 371 | }; |
376 | 372 | ||
377 | static const struct v4l2_ioctl_ops terratec_ioctl_ops = { | 373 | static const struct v4l2_ioctl_ops terratec_ioctl_ops = { |
diff --git a/drivers/media/radio/radio-trust.c b/drivers/media/radio/radio-trust.c index e7b111fcd105..bdf9cb6a75f4 100644 --- a/drivers/media/radio/radio-trust.c +++ b/drivers/media/radio/radio-trust.c | |||
@@ -337,26 +337,22 @@ static int vidioc_s_audio(struct file *file, void *priv, | |||
337 | return 0; | 337 | return 0; |
338 | } | 338 | } |
339 | 339 | ||
340 | static int trust_exclusive_open(struct inode *inode, struct file *file) | 340 | static int trust_exclusive_open(struct file *file) |
341 | { | 341 | { |
342 | return test_and_set_bit(0, &in_use) ? -EBUSY : 0; | 342 | return test_and_set_bit(0, &in_use) ? -EBUSY : 0; |
343 | } | 343 | } |
344 | 344 | ||
345 | static int trust_exclusive_release(struct inode *inode, struct file *file) | 345 | static int trust_exclusive_release(struct file *file) |
346 | { | 346 | { |
347 | clear_bit(0, &in_use); | 347 | clear_bit(0, &in_use); |
348 | return 0; | 348 | return 0; |
349 | } | 349 | } |
350 | 350 | ||
351 | static const struct file_operations trust_fops = { | 351 | static const struct v4l2_file_operations trust_fops = { |
352 | .owner = THIS_MODULE, | 352 | .owner = THIS_MODULE, |
353 | .open = trust_exclusive_open, | 353 | .open = trust_exclusive_open, |
354 | .release = trust_exclusive_release, | 354 | .release = trust_exclusive_release, |
355 | .ioctl = video_ioctl2, | 355 | .ioctl = video_ioctl2, |
356 | #ifdef CONFIG_COMPAT | ||
357 | .compat_ioctl = v4l_compat_ioctl32, | ||
358 | #endif | ||
359 | .llseek = no_llseek, | ||
360 | }; | 356 | }; |
361 | 357 | ||
362 | static const struct v4l2_ioctl_ops trust_ioctl_ops = { | 358 | static const struct v4l2_ioctl_ops trust_ioctl_ops = { |
diff --git a/drivers/media/radio/radio-typhoon.c b/drivers/media/radio/radio-typhoon.c index 952ec35a8415..5c3b319dab37 100644 --- a/drivers/media/radio/radio-typhoon.c +++ b/drivers/media/radio/radio-typhoon.c | |||
@@ -330,26 +330,22 @@ static struct typhoon_device typhoon_unit = | |||
330 | .mutefreq = CONFIG_RADIO_TYPHOON_MUTEFREQ, | 330 | .mutefreq = CONFIG_RADIO_TYPHOON_MUTEFREQ, |
331 | }; | 331 | }; |
332 | 332 | ||
333 | static int typhoon_exclusive_open(struct inode *inode, struct file *file) | 333 | static int typhoon_exclusive_open(struct file *file) |
334 | { | 334 | { |
335 | return test_and_set_bit(0, &typhoon_unit.in_use) ? -EBUSY : 0; | 335 | return test_and_set_bit(0, &typhoon_unit.in_use) ? -EBUSY : 0; |
336 | } | 336 | } |
337 | 337 | ||
338 | static int typhoon_exclusive_release(struct inode *inode, struct file *file) | 338 | static int typhoon_exclusive_release(struct file *file) |
339 | { | 339 | { |
340 | clear_bit(0, &typhoon_unit.in_use); | 340 | clear_bit(0, &typhoon_unit.in_use); |
341 | return 0; | 341 | return 0; |
342 | } | 342 | } |
343 | 343 | ||
344 | static const struct file_operations typhoon_fops = { | 344 | static const struct v4l2_file_operations typhoon_fops = { |
345 | .owner = THIS_MODULE, | 345 | .owner = THIS_MODULE, |
346 | .open = typhoon_exclusive_open, | 346 | .open = typhoon_exclusive_open, |
347 | .release = typhoon_exclusive_release, | 347 | .release = typhoon_exclusive_release, |
348 | .ioctl = video_ioctl2, | 348 | .ioctl = video_ioctl2, |
349 | #ifdef CONFIG_COMPAT | ||
350 | .compat_ioctl = v4l_compat_ioctl32, | ||
351 | #endif | ||
352 | .llseek = no_llseek, | ||
353 | }; | 349 | }; |
354 | 350 | ||
355 | static const struct v4l2_ioctl_ops typhoon_ioctl_ops = { | 351 | static const struct v4l2_ioctl_ops typhoon_ioctl_ops = { |
diff --git a/drivers/media/radio/radio-zoltrix.c b/drivers/media/radio/radio-zoltrix.c index 15b10bad6796..d2ac17eeec5f 100644 --- a/drivers/media/radio/radio-zoltrix.c +++ b/drivers/media/radio/radio-zoltrix.c | |||
@@ -401,27 +401,23 @@ static int vidioc_s_audio(struct file *file, void *priv, | |||
401 | 401 | ||
402 | static struct zol_device zoltrix_unit; | 402 | static struct zol_device zoltrix_unit; |
403 | 403 | ||
404 | static int zoltrix_exclusive_open(struct inode *inode, struct file *file) | 404 | static int zoltrix_exclusive_open(struct file *file) |
405 | { | 405 | { |
406 | return test_and_set_bit(0, &zoltrix_unit.in_use) ? -EBUSY : 0; | 406 | return test_and_set_bit(0, &zoltrix_unit.in_use) ? -EBUSY : 0; |
407 | } | 407 | } |
408 | 408 | ||
409 | static int zoltrix_exclusive_release(struct inode *inode, struct file *file) | 409 | static int zoltrix_exclusive_release(struct file *file) |
410 | { | 410 | { |
411 | clear_bit(0, &zoltrix_unit.in_use); | 411 | clear_bit(0, &zoltrix_unit.in_use); |
412 | return 0; | 412 | return 0; |
413 | } | 413 | } |
414 | 414 | ||
415 | static const struct file_operations zoltrix_fops = | 415 | static const struct v4l2_file_operations zoltrix_fops = |
416 | { | 416 | { |
417 | .owner = THIS_MODULE, | 417 | .owner = THIS_MODULE, |
418 | .open = zoltrix_exclusive_open, | 418 | .open = zoltrix_exclusive_open, |
419 | .release = zoltrix_exclusive_release, | 419 | .release = zoltrix_exclusive_release, |
420 | .ioctl = video_ioctl2, | 420 | .ioctl = video_ioctl2, |
421 | #ifdef CONFIG_COMPAT | ||
422 | .compat_ioctl = v4l_compat_ioctl32, | ||
423 | #endif | ||
424 | .llseek = no_llseek, | ||
425 | }; | 421 | }; |
426 | 422 | ||
427 | static const struct v4l2_ioctl_ops zoltrix_ioctl_ops = { | 423 | static const struct v4l2_ioctl_ops zoltrix_ioctl_ops = { |
diff --git a/drivers/media/video/arv.c b/drivers/media/video/arv.c index 2ba6abd92b6f..f18fb7367e9a 100644 --- a/drivers/media/video/arv.c +++ b/drivers/media/video/arv.c | |||
@@ -539,7 +539,7 @@ static int ar_do_ioctl(struct file *file, unsigned int cmd, void *arg) | |||
539 | return 0; | 539 | return 0; |
540 | } | 540 | } |
541 | 541 | ||
542 | static int ar_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | 542 | static int ar_ioctl(struct file *file, unsigned int cmd, |
543 | unsigned long arg) | 543 | unsigned long arg) |
544 | { | 544 | { |
545 | return video_usercopy(file, cmd, arg, ar_do_ioctl); | 545 | return video_usercopy(file, cmd, arg, ar_do_ioctl); |
@@ -744,27 +744,23 @@ void ar_release(struct video_device *vfd) | |||
744 | ****************************************************************************/ | 744 | ****************************************************************************/ |
745 | static struct ar_device ardev; | 745 | static struct ar_device ardev; |
746 | 746 | ||
747 | static int ar_exclusive_open(struct inode *inode, struct file *file) | 747 | static int ar_exclusive_open(struct file *file) |
748 | { | 748 | { |
749 | return test_and_set_bit(0, &ardev.in_use) ? -EBUSY : 0; | 749 | return test_and_set_bit(0, &ardev.in_use) ? -EBUSY : 0; |
750 | } | 750 | } |
751 | 751 | ||
752 | static int ar_exclusive_release(struct inode *inode, struct file *file) | 752 | static int ar_exclusive_release(struct file *file) |
753 | { | 753 | { |
754 | clear_bit(0, &ardev.in_use); | 754 | clear_bit(0, &ardev.in_use); |
755 | return 0; | 755 | return 0; |
756 | } | 756 | } |
757 | 757 | ||
758 | static const struct file_operations ar_fops = { | 758 | static const struct v4l2_file_operations ar_fops = { |
759 | .owner = THIS_MODULE, | 759 | .owner = THIS_MODULE, |
760 | .open = ar_exclusive_open, | 760 | .open = ar_exclusive_open, |
761 | .release = ar_exclusive_release, | 761 | .release = ar_exclusive_release, |
762 | .read = ar_read, | 762 | .read = ar_read, |
763 | .ioctl = ar_ioctl, | 763 | .ioctl = ar_ioctl, |
764 | #ifdef CONFIG_COMPAT | ||
765 | .compat_ioctl = v4l_compat_ioctl32, | ||
766 | #endif | ||
767 | .llseek = no_llseek, | ||
768 | }; | 764 | }; |
769 | 765 | ||
770 | static struct video_device ar_template = { | 766 | static struct video_device ar_template = { |
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c index 9ec4cec2e52d..ebcb8e5e9c4d 100644 --- a/drivers/media/video/bt8xx/bttv-driver.c +++ b/drivers/media/video/bt8xx/bttv-driver.c | |||
@@ -3208,9 +3208,9 @@ err: | |||
3208 | return POLLERR; | 3208 | return POLLERR; |
3209 | } | 3209 | } |
3210 | 3210 | ||
3211 | static int bttv_open(struct inode *inode, struct file *file) | 3211 | static int bttv_open(struct file *file) |
3212 | { | 3212 | { |
3213 | int minor = iminor(inode); | 3213 | int minor = video_devdata(file)->minor; |
3214 | struct bttv *btv = NULL; | 3214 | struct bttv *btv = NULL; |
3215 | struct bttv_fh *fh; | 3215 | struct bttv_fh *fh; |
3216 | enum v4l2_buf_type type = 0; | 3216 | enum v4l2_buf_type type = 0; |
@@ -3291,7 +3291,7 @@ static int bttv_open(struct inode *inode, struct file *file) | |||
3291 | return 0; | 3291 | return 0; |
3292 | } | 3292 | } |
3293 | 3293 | ||
3294 | static int bttv_release(struct inode *inode, struct file *file) | 3294 | static int bttv_release(struct file *file) |
3295 | { | 3295 | { |
3296 | struct bttv_fh *fh = file->private_data; | 3296 | struct bttv_fh *fh = file->private_data; |
3297 | struct bttv *btv = fh->btv; | 3297 | struct bttv *btv = fh->btv; |
@@ -3346,14 +3346,12 @@ bttv_mmap(struct file *file, struct vm_area_struct *vma) | |||
3346 | return videobuf_mmap_mapper(bttv_queue(fh),vma); | 3346 | return videobuf_mmap_mapper(bttv_queue(fh),vma); |
3347 | } | 3347 | } |
3348 | 3348 | ||
3349 | static const struct file_operations bttv_fops = | 3349 | static const struct v4l2_file_operations bttv_fops = |
3350 | { | 3350 | { |
3351 | .owner = THIS_MODULE, | 3351 | .owner = THIS_MODULE, |
3352 | .open = bttv_open, | 3352 | .open = bttv_open, |
3353 | .release = bttv_release, | 3353 | .release = bttv_release, |
3354 | .ioctl = video_ioctl2, | 3354 | .ioctl = video_ioctl2, |
3355 | .compat_ioctl = v4l_compat_ioctl32, | ||
3356 | .llseek = no_llseek, | ||
3357 | .read = bttv_read, | 3355 | .read = bttv_read, |
3358 | .mmap = bttv_mmap, | 3356 | .mmap = bttv_mmap, |
3359 | .poll = bttv_poll, | 3357 | .poll = bttv_poll, |
@@ -3422,9 +3420,9 @@ static struct video_device bttv_video_template = { | |||
3422 | /* ----------------------------------------------------------------------- */ | 3420 | /* ----------------------------------------------------------------------- */ |
3423 | /* radio interface */ | 3421 | /* radio interface */ |
3424 | 3422 | ||
3425 | static int radio_open(struct inode *inode, struct file *file) | 3423 | static int radio_open(struct file *file) |
3426 | { | 3424 | { |
3427 | int minor = iminor(inode); | 3425 | int minor = video_devdata(file)->minor; |
3428 | struct bttv *btv = NULL; | 3426 | struct bttv *btv = NULL; |
3429 | struct bttv_fh *fh; | 3427 | struct bttv_fh *fh; |
3430 | unsigned int i; | 3428 | unsigned int i; |
@@ -3467,7 +3465,7 @@ static int radio_open(struct inode *inode, struct file *file) | |||
3467 | return 0; | 3465 | return 0; |
3468 | } | 3466 | } |
3469 | 3467 | ||
3470 | static int radio_release(struct inode *inode, struct file *file) | 3468 | static int radio_release(struct file *file) |
3471 | { | 3469 | { |
3472 | struct bttv_fh *fh = file->private_data; | 3470 | struct bttv_fh *fh = file->private_data; |
3473 | struct bttv *btv = fh->btv; | 3471 | struct bttv *btv = fh->btv; |
@@ -3633,15 +3631,13 @@ static unsigned int radio_poll(struct file *file, poll_table *wait) | |||
3633 | return cmd.result; | 3631 | return cmd.result; |
3634 | } | 3632 | } |
3635 | 3633 | ||
3636 | static const struct file_operations radio_fops = | 3634 | static const struct v4l2_file_operations radio_fops = |
3637 | { | 3635 | { |
3638 | .owner = THIS_MODULE, | 3636 | .owner = THIS_MODULE, |
3639 | .open = radio_open, | 3637 | .open = radio_open, |
3640 | .read = radio_read, | 3638 | .read = radio_read, |
3641 | .release = radio_release, | 3639 | .release = radio_release, |
3642 | .compat_ioctl = v4l_compat_ioctl32, | ||
3643 | .ioctl = video_ioctl2, | 3640 | .ioctl = video_ioctl2, |
3644 | .llseek = no_llseek, | ||
3645 | .poll = radio_poll, | 3641 | .poll = radio_poll, |
3646 | }; | 3642 | }; |
3647 | 3643 | ||
diff --git a/drivers/media/video/bw-qcam.c b/drivers/media/video/bw-qcam.c index 17f80d03f38e..0b02be57b99c 100644 --- a/drivers/media/video/bw-qcam.c +++ b/drivers/media/video/bw-qcam.c | |||
@@ -863,7 +863,7 @@ static int qcam_do_ioctl(struct file *file, unsigned int cmd, void *arg) | |||
863 | return 0; | 863 | return 0; |
864 | } | 864 | } |
865 | 865 | ||
866 | static int qcam_ioctl(struct inode *inode, struct file *file, | 866 | static int qcam_ioctl(struct file *file, |
867 | unsigned int cmd, unsigned long arg) | 867 | unsigned int cmd, unsigned long arg) |
868 | { | 868 | { |
869 | return video_usercopy(file, cmd, arg, qcam_do_ioctl); | 869 | return video_usercopy(file, cmd, arg, qcam_do_ioctl); |
@@ -893,7 +893,7 @@ static ssize_t qcam_read(struct file *file, char __user *buf, | |||
893 | return len; | 893 | return len; |
894 | } | 894 | } |
895 | 895 | ||
896 | static int qcam_exclusive_open(struct inode *inode, struct file *file) | 896 | static int qcam_exclusive_open(struct file *file) |
897 | { | 897 | { |
898 | struct video_device *dev = video_devdata(file); | 898 | struct video_device *dev = video_devdata(file); |
899 | struct qcam_device *qcam = (struct qcam_device *)dev; | 899 | struct qcam_device *qcam = (struct qcam_device *)dev; |
@@ -901,7 +901,7 @@ static int qcam_exclusive_open(struct inode *inode, struct file *file) | |||
901 | return test_and_set_bit(0, &qcam->in_use) ? -EBUSY : 0; | 901 | return test_and_set_bit(0, &qcam->in_use) ? -EBUSY : 0; |
902 | } | 902 | } |
903 | 903 | ||
904 | static int qcam_exclusive_release(struct inode *inode, struct file *file) | 904 | static int qcam_exclusive_release(struct file *file) |
905 | { | 905 | { |
906 | struct video_device *dev = video_devdata(file); | 906 | struct video_device *dev = video_devdata(file); |
907 | struct qcam_device *qcam = (struct qcam_device *)dev; | 907 | struct qcam_device *qcam = (struct qcam_device *)dev; |
@@ -910,16 +910,12 @@ static int qcam_exclusive_release(struct inode *inode, struct file *file) | |||
910 | return 0; | 910 | return 0; |
911 | } | 911 | } |
912 | 912 | ||
913 | static const struct file_operations qcam_fops = { | 913 | static const struct v4l2_file_operations qcam_fops = { |
914 | .owner = THIS_MODULE, | 914 | .owner = THIS_MODULE, |
915 | .open = qcam_exclusive_open, | 915 | .open = qcam_exclusive_open, |
916 | .release = qcam_exclusive_release, | 916 | .release = qcam_exclusive_release, |
917 | .ioctl = qcam_ioctl, | 917 | .ioctl = qcam_ioctl, |
918 | #ifdef CONFIG_COMPAT | ||
919 | .compat_ioctl = v4l_compat_ioctl32, | ||
920 | #endif | ||
921 | .read = qcam_read, | 918 | .read = qcam_read, |
922 | .llseek = no_llseek, | ||
923 | }; | 919 | }; |
924 | static struct video_device qcam_template= | 920 | static struct video_device qcam_template= |
925 | { | 921 | { |
diff --git a/drivers/media/video/c-qcam.c b/drivers/media/video/c-qcam.c index 21c71eb085db..837c16df1f51 100644 --- a/drivers/media/video/c-qcam.c +++ b/drivers/media/video/c-qcam.c | |||
@@ -665,7 +665,7 @@ static int qcam_do_ioctl(struct file *file, unsigned int cmd, void *arg) | |||
665 | return 0; | 665 | return 0; |
666 | } | 666 | } |
667 | 667 | ||
668 | static int qcam_ioctl(struct inode *inode, struct file *file, | 668 | static int qcam_ioctl(struct file *file, |
669 | unsigned int cmd, unsigned long arg) | 669 | unsigned int cmd, unsigned long arg) |
670 | { | 670 | { |
671 | return video_usercopy(file, cmd, arg, qcam_do_ioctl); | 671 | return video_usercopy(file, cmd, arg, qcam_do_ioctl); |
@@ -687,7 +687,7 @@ static ssize_t qcam_read(struct file *file, char __user *buf, | |||
687 | return len; | 687 | return len; |
688 | } | 688 | } |
689 | 689 | ||
690 | static int qcam_exclusive_open(struct inode *inode, struct file *file) | 690 | static int qcam_exclusive_open(struct file *file) |
691 | { | 691 | { |
692 | struct video_device *dev = video_devdata(file); | 692 | struct video_device *dev = video_devdata(file); |
693 | struct qcam_device *qcam = (struct qcam_device *)dev; | 693 | struct qcam_device *qcam = (struct qcam_device *)dev; |
@@ -695,7 +695,7 @@ static int qcam_exclusive_open(struct inode *inode, struct file *file) | |||
695 | return test_and_set_bit(0, &qcam->in_use) ? -EBUSY : 0; | 695 | return test_and_set_bit(0, &qcam->in_use) ? -EBUSY : 0; |
696 | } | 696 | } |
697 | 697 | ||
698 | static int qcam_exclusive_release(struct inode *inode, struct file *file) | 698 | static int qcam_exclusive_release(struct file *file) |
699 | { | 699 | { |
700 | struct video_device *dev = video_devdata(file); | 700 | struct video_device *dev = video_devdata(file); |
701 | struct qcam_device *qcam = (struct qcam_device *)dev; | 701 | struct qcam_device *qcam = (struct qcam_device *)dev; |
@@ -705,16 +705,12 @@ static int qcam_exclusive_release(struct inode *inode, struct file *file) | |||
705 | } | 705 | } |
706 | 706 | ||
707 | /* video device template */ | 707 | /* video device template */ |
708 | static const struct file_operations qcam_fops = { | 708 | static const struct v4l2_file_operations qcam_fops = { |
709 | .owner = THIS_MODULE, | 709 | .owner = THIS_MODULE, |
710 | .open = qcam_exclusive_open, | 710 | .open = qcam_exclusive_open, |
711 | .release = qcam_exclusive_release, | 711 | .release = qcam_exclusive_release, |
712 | .ioctl = qcam_ioctl, | 712 | .ioctl = qcam_ioctl, |
713 | #ifdef CONFIG_COMPAT | ||
714 | .compat_ioctl = v4l_compat_ioctl32, | ||
715 | #endif | ||
716 | .read = qcam_read, | 713 | .read = qcam_read, |
717 | .llseek = no_llseek, | ||
718 | }; | 714 | }; |
719 | 715 | ||
720 | static struct video_device qcam_template= | 716 | static struct video_device qcam_template= |
diff --git a/drivers/media/video/cafe_ccic.c b/drivers/media/video/cafe_ccic.c index 1740b9ebdcef..476171cf5001 100644 --- a/drivers/media/video/cafe_ccic.c +++ b/drivers/media/video/cafe_ccic.c | |||
@@ -1472,11 +1472,11 @@ static int cafe_v4l_mmap(struct file *filp, struct vm_area_struct *vma) | |||
1472 | 1472 | ||
1473 | 1473 | ||
1474 | 1474 | ||
1475 | static int cafe_v4l_open(struct inode *inode, struct file *filp) | 1475 | static int cafe_v4l_open(struct file *filp) |
1476 | { | 1476 | { |
1477 | struct cafe_camera *cam; | 1477 | struct cafe_camera *cam; |
1478 | 1478 | ||
1479 | cam = cafe_find_dev(iminor(inode)); | 1479 | cam = cafe_find_dev(video_devdata(filp)->minor); |
1480 | if (cam == NULL) | 1480 | if (cam == NULL) |
1481 | return -ENODEV; | 1481 | return -ENODEV; |
1482 | filp->private_data = cam; | 1482 | filp->private_data = cam; |
@@ -1494,7 +1494,7 @@ static int cafe_v4l_open(struct inode *inode, struct file *filp) | |||
1494 | } | 1494 | } |
1495 | 1495 | ||
1496 | 1496 | ||
1497 | static int cafe_v4l_release(struct inode *inode, struct file *filp) | 1497 | static int cafe_v4l_release(struct file *filp) |
1498 | { | 1498 | { |
1499 | struct cafe_camera *cam = filp->private_data; | 1499 | struct cafe_camera *cam = filp->private_data; |
1500 | 1500 | ||
@@ -1759,7 +1759,7 @@ static void cafe_v4l_dev_release(struct video_device *vd) | |||
1759 | * clone it for specific real devices. | 1759 | * clone it for specific real devices. |
1760 | */ | 1760 | */ |
1761 | 1761 | ||
1762 | static const struct file_operations cafe_v4l_fops = { | 1762 | static const struct v4l2_file_operations cafe_v4l_fops = { |
1763 | .owner = THIS_MODULE, | 1763 | .owner = THIS_MODULE, |
1764 | .open = cafe_v4l_open, | 1764 | .open = cafe_v4l_open, |
1765 | .release = cafe_v4l_release, | 1765 | .release = cafe_v4l_release, |
@@ -1767,7 +1767,6 @@ static const struct file_operations cafe_v4l_fops = { | |||
1767 | .poll = cafe_v4l_poll, | 1767 | .poll = cafe_v4l_poll, |
1768 | .mmap = cafe_v4l_mmap, | 1768 | .mmap = cafe_v4l_mmap, |
1769 | .ioctl = video_ioctl2, | 1769 | .ioctl = video_ioctl2, |
1770 | .llseek = no_llseek, | ||
1771 | }; | 1770 | }; |
1772 | 1771 | ||
1773 | static const struct v4l2_ioctl_ops cafe_v4l_ioctl_ops = { | 1772 | static const struct v4l2_ioctl_ops cafe_v4l_ioctl_ops = { |
diff --git a/drivers/media/video/cpia.c b/drivers/media/video/cpia.c index 028a400d2453..9925ec0ab29d 100644 --- a/drivers/media/video/cpia.c +++ b/drivers/media/video/cpia.c | |||
@@ -3148,7 +3148,7 @@ static void put_cam(struct cpia_camera_ops* ops) | |||
3148 | } | 3148 | } |
3149 | 3149 | ||
3150 | /* ------------------------- V4L interface --------------------- */ | 3150 | /* ------------------------- V4L interface --------------------- */ |
3151 | static int cpia_open(struct inode *inode, struct file *file) | 3151 | static int cpia_open(struct file *file) |
3152 | { | 3152 | { |
3153 | struct video_device *dev = video_devdata(file); | 3153 | struct video_device *dev = video_devdata(file); |
3154 | struct cam_data *cam = video_get_drvdata(dev); | 3154 | struct cam_data *cam = video_get_drvdata(dev); |
@@ -3225,7 +3225,7 @@ static int cpia_open(struct inode *inode, struct file *file) | |||
3225 | return err; | 3225 | return err; |
3226 | } | 3226 | } |
3227 | 3227 | ||
3228 | static int cpia_close(struct inode *inode, struct file *file) | 3228 | static int cpia_close(struct file *file) |
3229 | { | 3229 | { |
3230 | struct video_device *dev = file->private_data; | 3230 | struct video_device *dev = file->private_data; |
3231 | struct cam_data *cam = video_get_drvdata(dev); | 3231 | struct cam_data *cam = video_get_drvdata(dev); |
@@ -3720,7 +3720,7 @@ static int cpia_do_ioctl(struct file *file, unsigned int cmd, void *arg) | |||
3720 | return retval; | 3720 | return retval; |
3721 | } | 3721 | } |
3722 | 3722 | ||
3723 | static int cpia_ioctl(struct inode *inode, struct file *file, | 3723 | static int cpia_ioctl(struct file *file, |
3724 | unsigned int cmd, unsigned long arg) | 3724 | unsigned int cmd, unsigned long arg) |
3725 | { | 3725 | { |
3726 | return video_usercopy(file, cmd, arg, cpia_do_ioctl); | 3726 | return video_usercopy(file, cmd, arg, cpia_do_ioctl); |
@@ -3780,17 +3780,13 @@ static int cpia_mmap(struct file *file, struct vm_area_struct *vma) | |||
3780 | return 0; | 3780 | return 0; |
3781 | } | 3781 | } |
3782 | 3782 | ||
3783 | static const struct file_operations cpia_fops = { | 3783 | static const struct v4l2_file_operations cpia_fops = { |
3784 | .owner = THIS_MODULE, | 3784 | .owner = THIS_MODULE, |
3785 | .open = cpia_open, | 3785 | .open = cpia_open, |
3786 | .release = cpia_close, | 3786 | .release = cpia_close, |
3787 | .read = cpia_read, | 3787 | .read = cpia_read, |
3788 | .mmap = cpia_mmap, | 3788 | .mmap = cpia_mmap, |
3789 | .ioctl = cpia_ioctl, | 3789 | .ioctl = cpia_ioctl, |
3790 | #ifdef CONFIG_COMPAT | ||
3791 | .compat_ioctl = v4l_compat_ioctl32, | ||
3792 | #endif | ||
3793 | .llseek = no_llseek, | ||
3794 | }; | 3790 | }; |
3795 | 3791 | ||
3796 | static struct video_device cpia_template = { | 3792 | static struct video_device cpia_template = { |
diff --git a/drivers/media/video/cpia2/cpia2_v4l.c b/drivers/media/video/cpia2/cpia2_v4l.c index 3c2d7eac1197..91870cc9c445 100644 --- a/drivers/media/video/cpia2/cpia2_v4l.c +++ b/drivers/media/video/cpia2/cpia2_v4l.c | |||
@@ -239,7 +239,7 @@ static struct v4l2_queryctrl controls[] = { | |||
239 | * cpia2_open | 239 | * cpia2_open |
240 | * | 240 | * |
241 | *****************************************************************************/ | 241 | *****************************************************************************/ |
242 | static int cpia2_open(struct inode *inode, struct file *file) | 242 | static int cpia2_open(struct file *file) |
243 | { | 243 | { |
244 | struct camera_data *cam = video_drvdata(file); | 244 | struct camera_data *cam = video_drvdata(file); |
245 | int retval = 0; | 245 | int retval = 0; |
@@ -302,7 +302,7 @@ err_return: | |||
302 | * cpia2_close | 302 | * cpia2_close |
303 | * | 303 | * |
304 | *****************************************************************************/ | 304 | *****************************************************************************/ |
305 | static int cpia2_close(struct inode *inode, struct file *file) | 305 | static int cpia2_close(struct file *file) |
306 | { | 306 | { |
307 | struct video_device *dev = video_devdata(file); | 307 | struct video_device *dev = video_devdata(file); |
308 | struct camera_data *cam = video_get_drvdata(dev); | 308 | struct camera_data *cam = video_get_drvdata(dev); |
@@ -1841,7 +1841,7 @@ static int cpia2_do_ioctl(struct file *file, unsigned int cmd, void *arg) | |||
1841 | return retval; | 1841 | return retval; |
1842 | } | 1842 | } |
1843 | 1843 | ||
1844 | static int cpia2_ioctl(struct inode *inode, struct file *file, | 1844 | static int cpia2_ioctl(struct file *file, |
1845 | unsigned int cmd, unsigned long arg) | 1845 | unsigned int cmd, unsigned long arg) |
1846 | { | 1846 | { |
1847 | return video_usercopy(file, cmd, arg, cpia2_do_ioctl); | 1847 | return video_usercopy(file, cmd, arg, cpia2_do_ioctl); |
@@ -1912,17 +1912,13 @@ static void reset_camera_struct_v4l(struct camera_data *cam) | |||
1912 | /*** | 1912 | /*** |
1913 | * The v4l video device structure initialized for this device | 1913 | * The v4l video device structure initialized for this device |
1914 | ***/ | 1914 | ***/ |
1915 | static const struct file_operations fops_template = { | 1915 | static const struct v4l2_file_operations fops_template = { |
1916 | .owner = THIS_MODULE, | 1916 | .owner = THIS_MODULE, |
1917 | .open = cpia2_open, | 1917 | .open = cpia2_open, |
1918 | .release = cpia2_close, | 1918 | .release = cpia2_close, |
1919 | .read = cpia2_v4l_read, | 1919 | .read = cpia2_v4l_read, |
1920 | .poll = cpia2_v4l_poll, | 1920 | .poll = cpia2_v4l_poll, |
1921 | .ioctl = cpia2_ioctl, | 1921 | .ioctl = cpia2_ioctl, |
1922 | .llseek = no_llseek, | ||
1923 | #ifdef CONFIG_COMPAT | ||
1924 | .compat_ioctl = v4l_compat_ioctl32, | ||
1925 | #endif | ||
1926 | .mmap = cpia2_mmap, | 1922 | .mmap = cpia2_mmap, |
1927 | }; | 1923 | }; |
1928 | 1924 | ||
diff --git a/drivers/media/video/cx18/cx18-fileops.c b/drivers/media/video/cx18/cx18-fileops.c index 425271a29517..055f6e004b2d 100644 --- a/drivers/media/video/cx18/cx18-fileops.c +++ b/drivers/media/video/cx18/cx18-fileops.c | |||
@@ -552,7 +552,7 @@ void cx18_stop_capture(struct cx18_open_id *id, int gop_end) | |||
552 | } | 552 | } |
553 | } | 553 | } |
554 | 554 | ||
555 | int cx18_v4l2_close(struct inode *inode, struct file *filp) | 555 | int cx18_v4l2_close(struct file *filp) |
556 | { | 556 | { |
557 | struct cx18_open_id *id = filp->private_data; | 557 | struct cx18_open_id *id = filp->private_data; |
558 | struct cx18 *cx = id->cx; | 558 | struct cx18 *cx = id->cx; |
@@ -650,12 +650,12 @@ static int cx18_serialized_open(struct cx18_stream *s, struct file *filp) | |||
650 | return 0; | 650 | return 0; |
651 | } | 651 | } |
652 | 652 | ||
653 | int cx18_v4l2_open(struct inode *inode, struct file *filp) | 653 | int cx18_v4l2_open(struct file *filp) |
654 | { | 654 | { |
655 | int res, x, y = 0; | 655 | int res, x, y = 0; |
656 | struct cx18 *cx = NULL; | 656 | struct cx18 *cx = NULL; |
657 | struct cx18_stream *s = NULL; | 657 | struct cx18_stream *s = NULL; |
658 | int minor = iminor(inode); | 658 | int minor = video_devdata(filp)->minor; |
659 | 659 | ||
660 | /* Find which card this open was on */ | 660 | /* Find which card this open was on */ |
661 | spin_lock(&cx18_cards_lock); | 661 | spin_lock(&cx18_cards_lock); |
diff --git a/drivers/media/video/cx18/cx18-fileops.h b/drivers/media/video/cx18/cx18-fileops.h index 46da0282fc7d..92e2d5dab936 100644 --- a/drivers/media/video/cx18/cx18-fileops.h +++ b/drivers/media/video/cx18/cx18-fileops.h | |||
@@ -22,12 +22,12 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | /* Testing/Debugging */ | 24 | /* Testing/Debugging */ |
25 | int cx18_v4l2_open(struct inode *inode, struct file *filp); | 25 | int cx18_v4l2_open(struct file *filp); |
26 | ssize_t cx18_v4l2_read(struct file *filp, char __user *buf, size_t count, | 26 | ssize_t cx18_v4l2_read(struct file *filp, char __user *buf, size_t count, |
27 | loff_t *pos); | 27 | loff_t *pos); |
28 | ssize_t cx18_v4l2_write(struct file *filp, const char __user *buf, size_t count, | 28 | ssize_t cx18_v4l2_write(struct file *filp, const char __user *buf, size_t count, |
29 | loff_t *pos); | 29 | loff_t *pos); |
30 | int cx18_v4l2_close(struct inode *inode, struct file *filp); | 30 | int cx18_v4l2_close(struct file *filp); |
31 | unsigned int cx18_v4l2_enc_poll(struct file *filp, poll_table *wait); | 31 | unsigned int cx18_v4l2_enc_poll(struct file *filp, poll_table *wait); |
32 | int cx18_start_capture(struct cx18_open_id *id); | 32 | int cx18_start_capture(struct cx18_open_id *id); |
33 | void cx18_stop_capture(struct cx18_open_id *id, int gop_end); | 33 | void cx18_stop_capture(struct cx18_open_id *id, int gop_end); |
diff --git a/drivers/media/video/cx18/cx18-ioctl.c b/drivers/media/video/cx18/cx18-ioctl.c index e6087486f889..5023075506fb 100644 --- a/drivers/media/video/cx18/cx18-ioctl.c +++ b/drivers/media/video/cx18/cx18-ioctl.c | |||
@@ -783,7 +783,7 @@ static int cx18_default(struct file *file, void *fh, int cmd, void *arg) | |||
783 | return 0; | 783 | return 0; |
784 | } | 784 | } |
785 | 785 | ||
786 | int cx18_v4l2_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, | 786 | int cx18_v4l2_ioctl(struct file *filp, unsigned int cmd, |
787 | unsigned long arg) | 787 | unsigned long arg) |
788 | { | 788 | { |
789 | struct video_device *vfd = video_devdata(filp); | 789 | struct video_device *vfd = video_devdata(filp); |
@@ -795,7 +795,7 @@ int cx18_v4l2_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, | |||
795 | 795 | ||
796 | if (cx18_debug & CX18_DBGFLG_IOCTL) | 796 | if (cx18_debug & CX18_DBGFLG_IOCTL) |
797 | vfd->debug = V4L2_DEBUG_IOCTL | V4L2_DEBUG_IOCTL_ARG; | 797 | vfd->debug = V4L2_DEBUG_IOCTL | V4L2_DEBUG_IOCTL_ARG; |
798 | res = video_ioctl2(inode, filp, cmd, arg); | 798 | res = video_ioctl2(filp, cmd, arg); |
799 | vfd->debug = 0; | 799 | vfd->debug = 0; |
800 | mutex_unlock(&cx->serialize_lock); | 800 | mutex_unlock(&cx->serialize_lock); |
801 | return res; | 801 | return res; |
diff --git a/drivers/media/video/cx18/cx18-ioctl.h b/drivers/media/video/cx18/cx18-ioctl.h index 08fe24e9510e..50b8d6056cdf 100644 --- a/drivers/media/video/cx18/cx18-ioctl.h +++ b/drivers/media/video/cx18/cx18-ioctl.h | |||
@@ -29,5 +29,5 @@ void cx18_set_funcs(struct video_device *vdev); | |||
29 | int cx18_s_std(struct file *file, void *fh, v4l2_std_id *std); | 29 | int cx18_s_std(struct file *file, void *fh, v4l2_std_id *std); |
30 | int cx18_s_frequency(struct file *file, void *fh, struct v4l2_frequency *vf); | 30 | int cx18_s_frequency(struct file *file, void *fh, struct v4l2_frequency *vf); |
31 | int cx18_s_input(struct file *file, void *fh, unsigned int inp); | 31 | int cx18_s_input(struct file *file, void *fh, unsigned int inp); |
32 | int cx18_v4l2_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, | 32 | int cx18_v4l2_ioctl(struct file *filp, unsigned int cmd, |
33 | unsigned long arg); | 33 | unsigned long arg); |
diff --git a/drivers/media/video/cx18/cx18-streams.c b/drivers/media/video/cx18/cx18-streams.c index 63c336c95ff5..89c1ec94f335 100644 --- a/drivers/media/video/cx18/cx18-streams.c +++ b/drivers/media/video/cx18/cx18-streams.c | |||
@@ -37,13 +37,12 @@ | |||
37 | 37 | ||
38 | #define CX18_DSP0_INTERRUPT_MASK 0xd0004C | 38 | #define CX18_DSP0_INTERRUPT_MASK 0xd0004C |
39 | 39 | ||
40 | static struct file_operations cx18_v4l2_enc_fops = { | 40 | static struct v4l2_file_operations cx18_v4l2_enc_fops = { |
41 | .owner = THIS_MODULE, | 41 | .owner = THIS_MODULE, |
42 | .read = cx18_v4l2_read, | 42 | .read = cx18_v4l2_read, |
43 | .open = cx18_v4l2_open, | 43 | .open = cx18_v4l2_open, |
44 | /* FIXME change to video_ioctl2 if serialization lock can be removed */ | 44 | /* FIXME change to video_ioctl2 if serialization lock can be removed */ |
45 | .ioctl = cx18_v4l2_ioctl, | 45 | .ioctl = cx18_v4l2_ioctl, |
46 | .compat_ioctl = v4l_compat_ioctl32, | ||
47 | .release = cx18_v4l2_close, | 46 | .release = cx18_v4l2_close, |
48 | .poll = cx18_v4l2_enc_poll, | 47 | .poll = cx18_v4l2_enc_poll, |
49 | }; | 48 | }; |
@@ -61,49 +60,41 @@ static struct { | |||
61 | int num_offset; | 60 | int num_offset; |
62 | int dma; | 61 | int dma; |
63 | enum v4l2_buf_type buf_type; | 62 | enum v4l2_buf_type buf_type; |
64 | struct file_operations *fops; | ||
65 | } cx18_stream_info[] = { | 63 | } cx18_stream_info[] = { |
66 | { /* CX18_ENC_STREAM_TYPE_MPG */ | 64 | { /* CX18_ENC_STREAM_TYPE_MPG */ |
67 | "encoder MPEG", | 65 | "encoder MPEG", |
68 | VFL_TYPE_GRABBER, 0, | 66 | VFL_TYPE_GRABBER, 0, |
69 | PCI_DMA_FROMDEVICE, V4L2_BUF_TYPE_VIDEO_CAPTURE, | 67 | PCI_DMA_FROMDEVICE, V4L2_BUF_TYPE_VIDEO_CAPTURE, |
70 | &cx18_v4l2_enc_fops | ||
71 | }, | 68 | }, |
72 | { /* CX18_ENC_STREAM_TYPE_TS */ | 69 | { /* CX18_ENC_STREAM_TYPE_TS */ |
73 | "TS", | 70 | "TS", |
74 | VFL_TYPE_GRABBER, -1, | 71 | VFL_TYPE_GRABBER, -1, |
75 | PCI_DMA_FROMDEVICE, V4L2_BUF_TYPE_VIDEO_CAPTURE, | 72 | PCI_DMA_FROMDEVICE, V4L2_BUF_TYPE_VIDEO_CAPTURE, |
76 | &cx18_v4l2_enc_fops | ||
77 | }, | 73 | }, |
78 | { /* CX18_ENC_STREAM_TYPE_YUV */ | 74 | { /* CX18_ENC_STREAM_TYPE_YUV */ |
79 | "encoder YUV", | 75 | "encoder YUV", |
80 | VFL_TYPE_GRABBER, CX18_V4L2_ENC_YUV_OFFSET, | 76 | VFL_TYPE_GRABBER, CX18_V4L2_ENC_YUV_OFFSET, |
81 | PCI_DMA_FROMDEVICE, V4L2_BUF_TYPE_VIDEO_CAPTURE, | 77 | PCI_DMA_FROMDEVICE, V4L2_BUF_TYPE_VIDEO_CAPTURE, |
82 | &cx18_v4l2_enc_fops | ||
83 | }, | 78 | }, |
84 | { /* CX18_ENC_STREAM_TYPE_VBI */ | 79 | { /* CX18_ENC_STREAM_TYPE_VBI */ |
85 | "encoder VBI", | 80 | "encoder VBI", |
86 | VFL_TYPE_VBI, 0, | 81 | VFL_TYPE_VBI, 0, |
87 | PCI_DMA_FROMDEVICE, V4L2_BUF_TYPE_VBI_CAPTURE, | 82 | PCI_DMA_FROMDEVICE, V4L2_BUF_TYPE_VBI_CAPTURE, |
88 | &cx18_v4l2_enc_fops | ||
89 | }, | 83 | }, |
90 | { /* CX18_ENC_STREAM_TYPE_PCM */ | 84 | { /* CX18_ENC_STREAM_TYPE_PCM */ |
91 | "encoder PCM audio", | 85 | "encoder PCM audio", |
92 | VFL_TYPE_GRABBER, CX18_V4L2_ENC_PCM_OFFSET, | 86 | VFL_TYPE_GRABBER, CX18_V4L2_ENC_PCM_OFFSET, |
93 | PCI_DMA_FROMDEVICE, V4L2_BUF_TYPE_PRIVATE, | 87 | PCI_DMA_FROMDEVICE, V4L2_BUF_TYPE_PRIVATE, |
94 | &cx18_v4l2_enc_fops | ||
95 | }, | 88 | }, |
96 | { /* CX18_ENC_STREAM_TYPE_IDX */ | 89 | { /* CX18_ENC_STREAM_TYPE_IDX */ |
97 | "encoder IDX", | 90 | "encoder IDX", |
98 | VFL_TYPE_GRABBER, -1, | 91 | VFL_TYPE_GRABBER, -1, |
99 | PCI_DMA_FROMDEVICE, V4L2_BUF_TYPE_VIDEO_CAPTURE, | 92 | PCI_DMA_FROMDEVICE, V4L2_BUF_TYPE_VIDEO_CAPTURE, |
100 | &cx18_v4l2_enc_fops | ||
101 | }, | 93 | }, |
102 | { /* CX18_ENC_STREAM_TYPE_RAD */ | 94 | { /* CX18_ENC_STREAM_TYPE_RAD */ |
103 | "encoder radio", | 95 | "encoder radio", |
104 | VFL_TYPE_RADIO, 0, | 96 | VFL_TYPE_RADIO, 0, |
105 | PCI_DMA_NONE, V4L2_BUF_TYPE_PRIVATE, | 97 | PCI_DMA_NONE, V4L2_BUF_TYPE_PRIVATE, |
106 | &cx18_v4l2_enc_fops | ||
107 | }, | 98 | }, |
108 | }; | 99 | }; |
109 | 100 | ||
@@ -184,7 +175,7 @@ static int cx18_prep_dev(struct cx18 *cx, int type) | |||
184 | 175 | ||
185 | s->v4l2dev->num = num; | 176 | s->v4l2dev->num = num; |
186 | s->v4l2dev->parent = &cx->dev->dev; | 177 | s->v4l2dev->parent = &cx->dev->dev; |
187 | s->v4l2dev->fops = cx18_stream_info[type].fops; | 178 | s->v4l2dev->fops = &cx18_v4l2_enc_fops; |
188 | s->v4l2dev->release = video_device_release; | 179 | s->v4l2dev->release = video_device_release; |
189 | s->v4l2dev->tvnorms = V4L2_STD_ALL; | 180 | s->v4l2dev->tvnorms = V4L2_STD_ALL; |
190 | cx18_set_funcs(s->v4l2dev); | 181 | cx18_set_funcs(s->v4l2dev); |
diff --git a/drivers/media/video/cx23885/cx23885-417.c b/drivers/media/video/cx23885/cx23885-417.c index 798d24024353..d9888136255d 100644 --- a/drivers/media/video/cx23885/cx23885-417.c +++ b/drivers/media/video/cx23885/cx23885-417.c | |||
@@ -1573,9 +1573,9 @@ static int vidioc_queryctrl(struct file *file, void *priv, | |||
1573 | return cx23885_queryctrl(dev, c); | 1573 | return cx23885_queryctrl(dev, c); |
1574 | } | 1574 | } |
1575 | 1575 | ||
1576 | static int mpeg_open(struct inode *inode, struct file *file) | 1576 | static int mpeg_open(struct file *file) |
1577 | { | 1577 | { |
1578 | int minor = iminor(inode); | 1578 | int minor = video_devdata(file)->minor; |
1579 | struct cx23885_dev *h, *dev = NULL; | 1579 | struct cx23885_dev *h, *dev = NULL; |
1580 | struct list_head *list; | 1580 | struct list_head *list; |
1581 | struct cx23885_fh *fh; | 1581 | struct cx23885_fh *fh; |
@@ -1617,7 +1617,7 @@ static int mpeg_open(struct inode *inode, struct file *file) | |||
1617 | return 0; | 1617 | return 0; |
1618 | } | 1618 | } |
1619 | 1619 | ||
1620 | static int mpeg_release(struct inode *inode, struct file *file) | 1620 | static int mpeg_release(struct file *file) |
1621 | { | 1621 | { |
1622 | struct cx23885_fh *fh = file->private_data; | 1622 | struct cx23885_fh *fh = file->private_data; |
1623 | struct cx23885_dev *dev = fh->dev; | 1623 | struct cx23885_dev *dev = fh->dev; |
@@ -1694,15 +1694,13 @@ static int mpeg_mmap(struct file *file, struct vm_area_struct *vma) | |||
1694 | return videobuf_mmap_mapper(&fh->mpegq, vma); | 1694 | return videobuf_mmap_mapper(&fh->mpegq, vma); |
1695 | } | 1695 | } |
1696 | 1696 | ||
1697 | static struct file_operations mpeg_fops = { | 1697 | static struct v4l2_file_operations mpeg_fops = { |
1698 | .owner = THIS_MODULE, | 1698 | .owner = THIS_MODULE, |
1699 | .open = mpeg_open, | 1699 | .open = mpeg_open, |
1700 | .release = mpeg_release, | 1700 | .release = mpeg_release, |
1701 | .read = mpeg_read, | 1701 | .read = mpeg_read, |
1702 | .poll = mpeg_poll, | 1702 | .poll = mpeg_poll, |
1703 | .mmap = mpeg_mmap, | 1703 | .mmap = mpeg_mmap, |
1704 | .ioctl = video_ioctl2, | ||
1705 | .llseek = no_llseek, | ||
1706 | }; | 1704 | }; |
1707 | 1705 | ||
1708 | static const struct v4l2_ioctl_ops mpeg_ioctl_ops = { | 1706 | static const struct v4l2_ioctl_ops mpeg_ioctl_ops = { |
diff --git a/drivers/media/video/cx23885/cx23885-video.c b/drivers/media/video/cx23885/cx23885-video.c index c742a10be5cb..637c4d008846 100644 --- a/drivers/media/video/cx23885/cx23885-video.c +++ b/drivers/media/video/cx23885/cx23885-video.c | |||
@@ -718,9 +718,9 @@ static int get_resource(struct cx23885_fh *fh) | |||
718 | } | 718 | } |
719 | } | 719 | } |
720 | 720 | ||
721 | static int video_open(struct inode *inode, struct file *file) | 721 | static int video_open(struct file *file) |
722 | { | 722 | { |
723 | int minor = iminor(inode); | 723 | int minor = video_devdata(file)->minor; |
724 | struct cx23885_dev *h, *dev = NULL; | 724 | struct cx23885_dev *h, *dev = NULL; |
725 | struct cx23885_fh *fh; | 725 | struct cx23885_fh *fh; |
726 | struct list_head *list; | 726 | struct list_head *list; |
@@ -834,7 +834,7 @@ static unsigned int video_poll(struct file *file, | |||
834 | return 0; | 834 | return 0; |
835 | } | 835 | } |
836 | 836 | ||
837 | static int video_release(struct inode *inode, struct file *file) | 837 | static int video_release(struct file *file) |
838 | { | 838 | { |
839 | struct cx23885_fh *fh = file->private_data; | 839 | struct cx23885_fh *fh = file->private_data; |
840 | struct cx23885_dev *dev = fh->dev; | 840 | struct cx23885_dev *dev = fh->dev; |
@@ -1422,7 +1422,7 @@ int cx23885_video_irq(struct cx23885_dev *dev, u32 status) | |||
1422 | /* ----------------------------------------------------------- */ | 1422 | /* ----------------------------------------------------------- */ |
1423 | /* exported stuff */ | 1423 | /* exported stuff */ |
1424 | 1424 | ||
1425 | static const struct file_operations video_fops = { | 1425 | static const struct v4l2_file_operations video_fops = { |
1426 | .owner = THIS_MODULE, | 1426 | .owner = THIS_MODULE, |
1427 | .open = video_open, | 1427 | .open = video_open, |
1428 | .release = video_release, | 1428 | .release = video_release, |
@@ -1430,8 +1430,6 @@ static const struct file_operations video_fops = { | |||
1430 | .poll = video_poll, | 1430 | .poll = video_poll, |
1431 | .mmap = video_mmap, | 1431 | .mmap = video_mmap, |
1432 | .ioctl = video_ioctl2, | 1432 | .ioctl = video_ioctl2, |
1433 | .compat_ioctl = v4l_compat_ioctl32, | ||
1434 | .llseek = no_llseek, | ||
1435 | }; | 1433 | }; |
1436 | 1434 | ||
1437 | static const struct v4l2_ioctl_ops video_ioctl_ops = { | 1435 | static const struct v4l2_ioctl_ops video_ioctl_ops = { |
@@ -1479,13 +1477,11 @@ static struct video_device cx23885_video_template = { | |||
1479 | .current_norm = V4L2_STD_NTSC_M, | 1477 | .current_norm = V4L2_STD_NTSC_M, |
1480 | }; | 1478 | }; |
1481 | 1479 | ||
1482 | static const struct file_operations radio_fops = { | 1480 | static const struct v4l2_file_operations radio_fops = { |
1483 | .owner = THIS_MODULE, | 1481 | .owner = THIS_MODULE, |
1484 | .open = video_open, | 1482 | .open = video_open, |
1485 | .release = video_release, | 1483 | .release = video_release, |
1486 | .ioctl = video_ioctl2, | 1484 | .ioctl = video_ioctl2, |
1487 | .compat_ioctl = v4l_compat_ioctl32, | ||
1488 | .llseek = no_llseek, | ||
1489 | }; | 1485 | }; |
1490 | 1486 | ||
1491 | 1487 | ||
diff --git a/drivers/media/video/cx88/cx88-blackbird.c b/drivers/media/video/cx88/cx88-blackbird.c index e162a70748c5..7f5b8bfd08ac 100644 --- a/drivers/media/video/cx88/cx88-blackbird.c +++ b/drivers/media/video/cx88/cx88-blackbird.c | |||
@@ -1049,16 +1049,16 @@ static int vidioc_s_std (struct file *file, void *priv, v4l2_std_id *id) | |||
1049 | 1049 | ||
1050 | /* FIXME: cx88_ioctl_hook not implemented */ | 1050 | /* FIXME: cx88_ioctl_hook not implemented */ |
1051 | 1051 | ||
1052 | static int mpeg_open(struct inode *inode, struct file *file) | 1052 | static int mpeg_open(struct file *file) |
1053 | { | 1053 | { |
1054 | int minor = iminor(inode); | 1054 | int minor = video_devdata(file)->minor; |
1055 | struct cx8802_dev *dev = NULL; | 1055 | struct cx8802_dev *dev = NULL; |
1056 | struct cx8802_fh *fh; | 1056 | struct cx8802_fh *fh; |
1057 | struct cx8802_driver *drv = NULL; | 1057 | struct cx8802_driver *drv = NULL; |
1058 | int err; | 1058 | int err; |
1059 | 1059 | ||
1060 | lock_kernel(); | 1060 | lock_kernel(); |
1061 | dev = cx8802_get_device(inode); | 1061 | dev = cx8802_get_device(minor); |
1062 | 1062 | ||
1063 | dprintk( 1, "%s\n", __func__); | 1063 | dprintk( 1, "%s\n", __func__); |
1064 | 1064 | ||
@@ -1114,7 +1114,7 @@ static int mpeg_open(struct inode *inode, struct file *file) | |||
1114 | return 0; | 1114 | return 0; |
1115 | } | 1115 | } |
1116 | 1116 | ||
1117 | static int mpeg_release(struct inode *inode, struct file *file) | 1117 | static int mpeg_release(struct file *file) |
1118 | { | 1118 | { |
1119 | struct cx8802_fh *fh = file->private_data; | 1119 | struct cx8802_fh *fh = file->private_data; |
1120 | struct cx8802_dev *dev = fh->dev; | 1120 | struct cx8802_dev *dev = fh->dev; |
@@ -1132,7 +1132,7 @@ static int mpeg_release(struct inode *inode, struct file *file) | |||
1132 | kfree(fh); | 1132 | kfree(fh); |
1133 | 1133 | ||
1134 | /* Make sure we release the hardware */ | 1134 | /* Make sure we release the hardware */ |
1135 | dev = cx8802_get_device(inode); | 1135 | dev = cx8802_get_device(video_devdata(file)->minor); |
1136 | if (dev == NULL) | 1136 | if (dev == NULL) |
1137 | return -ENODEV; | 1137 | return -ENODEV; |
1138 | 1138 | ||
@@ -1178,7 +1178,7 @@ mpeg_mmap(struct file *file, struct vm_area_struct * vma) | |||
1178 | return videobuf_mmap_mapper(&fh->mpegq, vma); | 1178 | return videobuf_mmap_mapper(&fh->mpegq, vma); |
1179 | } | 1179 | } |
1180 | 1180 | ||
1181 | static const struct file_operations mpeg_fops = | 1181 | static const struct v4l2_file_operations mpeg_fops = |
1182 | { | 1182 | { |
1183 | .owner = THIS_MODULE, | 1183 | .owner = THIS_MODULE, |
1184 | .open = mpeg_open, | 1184 | .open = mpeg_open, |
@@ -1187,7 +1187,6 @@ static const struct file_operations mpeg_fops = | |||
1187 | .poll = mpeg_poll, | 1187 | .poll = mpeg_poll, |
1188 | .mmap = mpeg_mmap, | 1188 | .mmap = mpeg_mmap, |
1189 | .ioctl = video_ioctl2, | 1189 | .ioctl = video_ioctl2, |
1190 | .llseek = no_llseek, | ||
1191 | }; | 1190 | }; |
1192 | 1191 | ||
1193 | static const struct v4l2_ioctl_ops mpeg_ioctl_ops = { | 1192 | static const struct v4l2_ioctl_ops mpeg_ioctl_ops = { |
diff --git a/drivers/media/video/cx88/cx88-mpeg.c b/drivers/media/video/cx88/cx88-mpeg.c index a04fee235db6..59164fc94f5f 100644 --- a/drivers/media/video/cx88/cx88-mpeg.c +++ b/drivers/media/video/cx88/cx88-mpeg.c | |||
@@ -578,9 +578,8 @@ static int cx8802_resume_common(struct pci_dev *pci_dev) | |||
578 | 578 | ||
579 | #if defined(CONFIG_VIDEO_CX88_BLACKBIRD) || \ | 579 | #if defined(CONFIG_VIDEO_CX88_BLACKBIRD) || \ |
580 | defined(CONFIG_VIDEO_CX88_BLACKBIRD_MODULE) | 580 | defined(CONFIG_VIDEO_CX88_BLACKBIRD_MODULE) |
581 | struct cx8802_dev * cx8802_get_device(struct inode *inode) | 581 | struct cx8802_dev *cx8802_get_device(int minor) |
582 | { | 582 | { |
583 | int minor = iminor(inode); | ||
584 | struct cx8802_dev *dev; | 583 | struct cx8802_dev *dev; |
585 | 584 | ||
586 | list_for_each_entry(dev, &cx8802_devlist, devlist) | 585 | list_for_each_entry(dev, &cx8802_devlist, devlist) |
diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c index b96ce991d968..b93b7ab99d8c 100644 --- a/drivers/media/video/cx88/cx88-video.c +++ b/drivers/media/video/cx88/cx88-video.c | |||
@@ -757,9 +757,9 @@ static int get_ressource(struct cx8800_fh *fh) | |||
757 | } | 757 | } |
758 | } | 758 | } |
759 | 759 | ||
760 | static int video_open(struct inode *inode, struct file *file) | 760 | static int video_open(struct file *file) |
761 | { | 761 | { |
762 | int minor = iminor(inode); | 762 | int minor = video_devdata(file)->minor; |
763 | struct cx8800_dev *h,*dev = NULL; | 763 | struct cx8800_dev *h,*dev = NULL; |
764 | struct cx88_core *core; | 764 | struct cx88_core *core; |
765 | struct cx8800_fh *fh; | 765 | struct cx8800_fh *fh; |
@@ -904,7 +904,7 @@ video_poll(struct file *file, struct poll_table_struct *wait) | |||
904 | return 0; | 904 | return 0; |
905 | } | 905 | } |
906 | 906 | ||
907 | static int video_release(struct inode *inode, struct file *file) | 907 | static int video_release(struct file *file) |
908 | { | 908 | { |
909 | struct cx8800_fh *fh = file->private_data; | 909 | struct cx8800_fh *fh = file->private_data; |
910 | struct cx8800_dev *dev = fh->dev; | 910 | struct cx8800_dev *dev = fh->dev; |
@@ -1693,7 +1693,7 @@ static irqreturn_t cx8800_irq(int irq, void *dev_id) | |||
1693 | /* ----------------------------------------------------------- */ | 1693 | /* ----------------------------------------------------------- */ |
1694 | /* exported stuff */ | 1694 | /* exported stuff */ |
1695 | 1695 | ||
1696 | static const struct file_operations video_fops = | 1696 | static const struct v4l2_file_operations video_fops = |
1697 | { | 1697 | { |
1698 | .owner = THIS_MODULE, | 1698 | .owner = THIS_MODULE, |
1699 | .open = video_open, | 1699 | .open = video_open, |
@@ -1702,8 +1702,6 @@ static const struct file_operations video_fops = | |||
1702 | .poll = video_poll, | 1702 | .poll = video_poll, |
1703 | .mmap = video_mmap, | 1703 | .mmap = video_mmap, |
1704 | .ioctl = video_ioctl2, | 1704 | .ioctl = video_ioctl2, |
1705 | .compat_ioctl = v4l_compat_ioctl32, | ||
1706 | .llseek = no_llseek, | ||
1707 | }; | 1705 | }; |
1708 | 1706 | ||
1709 | static const struct v4l2_ioctl_ops video_ioctl_ops = { | 1707 | static const struct v4l2_ioctl_ops video_ioctl_ops = { |
@@ -1752,14 +1750,12 @@ static struct video_device cx8800_video_template = { | |||
1752 | .current_norm = V4L2_STD_NTSC_M, | 1750 | .current_norm = V4L2_STD_NTSC_M, |
1753 | }; | 1751 | }; |
1754 | 1752 | ||
1755 | static const struct file_operations radio_fops = | 1753 | static const struct v4l2_file_operations radio_fops = |
1756 | { | 1754 | { |
1757 | .owner = THIS_MODULE, | 1755 | .owner = THIS_MODULE, |
1758 | .open = video_open, | 1756 | .open = video_open, |
1759 | .release = video_release, | 1757 | .release = video_release, |
1760 | .ioctl = video_ioctl2, | 1758 | .ioctl = video_ioctl2, |
1761 | .compat_ioctl = v4l_compat_ioctl32, | ||
1762 | .llseek = no_llseek, | ||
1763 | }; | 1759 | }; |
1764 | 1760 | ||
1765 | static const struct v4l2_ioctl_ops radio_ioctl_ops = { | 1761 | static const struct v4l2_ioctl_ops radio_ioctl_ops = { |
diff --git a/drivers/media/video/cx88/cx88.h b/drivers/media/video/cx88/cx88.h index 20649b25f7ba..eb9ce30dc5e6 100644 --- a/drivers/media/video/cx88/cx88.h +++ b/drivers/media/video/cx88/cx88.h | |||
@@ -643,7 +643,7 @@ int cx88_audio_thread(void *data); | |||
643 | 643 | ||
644 | int cx8802_register_driver(struct cx8802_driver *drv); | 644 | int cx8802_register_driver(struct cx8802_driver *drv); |
645 | int cx8802_unregister_driver(struct cx8802_driver *drv); | 645 | int cx8802_unregister_driver(struct cx8802_driver *drv); |
646 | struct cx8802_dev * cx8802_get_device(struct inode *inode); | 646 | struct cx8802_dev *cx8802_get_device(int minor); |
647 | struct cx8802_driver * cx8802_get_driver(struct cx8802_dev *dev, enum cx88_board_type btype); | 647 | struct cx8802_driver * cx8802_get_driver(struct cx8802_dev *dev, enum cx88_board_type btype); |
648 | 648 | ||
649 | /* ----------------------------------------------------------- */ | 649 | /* ----------------------------------------------------------- */ |
diff --git a/drivers/media/video/em28xx/em28xx-core.c b/drivers/media/video/em28xx/em28xx-core.c index f8504518586a..819cceaa6ef4 100644 --- a/drivers/media/video/em28xx/em28xx-core.c +++ b/drivers/media/video/em28xx/em28xx-core.c | |||
@@ -1000,12 +1000,11 @@ void em28xx_wake_i2c(struct em28xx *dev) | |||
1000 | static LIST_HEAD(em28xx_devlist); | 1000 | static LIST_HEAD(em28xx_devlist); |
1001 | static DEFINE_MUTEX(em28xx_devlist_mutex); | 1001 | static DEFINE_MUTEX(em28xx_devlist_mutex); |
1002 | 1002 | ||
1003 | struct em28xx *em28xx_get_device(struct inode *inode, | 1003 | struct em28xx *em28xx_get_device(int minor, |
1004 | enum v4l2_buf_type *fh_type, | 1004 | enum v4l2_buf_type *fh_type, |
1005 | int *has_radio) | 1005 | int *has_radio) |
1006 | { | 1006 | { |
1007 | struct em28xx *h, *dev = NULL; | 1007 | struct em28xx *h, *dev = NULL; |
1008 | int minor = iminor(inode); | ||
1009 | 1008 | ||
1010 | *fh_type = V4L2_BUF_TYPE_VIDEO_CAPTURE; | 1009 | *fh_type = V4L2_BUF_TYPE_VIDEO_CAPTURE; |
1011 | *has_radio = 0; | 1010 | *has_radio = 0; |
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c index 53527536481e..9cb7c64a88fa 100644 --- a/drivers/media/video/em28xx/em28xx-video.c +++ b/drivers/media/video/em28xx/em28xx-video.c | |||
@@ -1582,15 +1582,15 @@ static int radio_queryctrl(struct file *file, void *priv, | |||
1582 | * em28xx_v4l2_open() | 1582 | * em28xx_v4l2_open() |
1583 | * inits the device and starts isoc transfer | 1583 | * inits the device and starts isoc transfer |
1584 | */ | 1584 | */ |
1585 | static int em28xx_v4l2_open(struct inode *inode, struct file *filp) | 1585 | static int em28xx_v4l2_open(struct file *filp) |
1586 | { | 1586 | { |
1587 | int minor = iminor(inode); | 1587 | int minor = video_devdata(filp)->minor; |
1588 | int errCode = 0, radio; | 1588 | int errCode = 0, radio; |
1589 | struct em28xx *dev; | 1589 | struct em28xx *dev; |
1590 | enum v4l2_buf_type fh_type; | 1590 | enum v4l2_buf_type fh_type; |
1591 | struct em28xx_fh *fh; | 1591 | struct em28xx_fh *fh; |
1592 | 1592 | ||
1593 | dev = em28xx_get_device(inode, &fh_type, &radio); | 1593 | dev = em28xx_get_device(minor, &fh_type, &radio); |
1594 | 1594 | ||
1595 | if (NULL == dev) | 1595 | if (NULL == dev) |
1596 | return -ENODEV; | 1596 | return -ENODEV; |
@@ -1686,7 +1686,7 @@ void em28xx_release_analog_resources(struct em28xx *dev) | |||
1686 | * stops streaming and deallocates all resources allocated by the v4l2 | 1686 | * stops streaming and deallocates all resources allocated by the v4l2 |
1687 | * calls and ioctls | 1687 | * calls and ioctls |
1688 | */ | 1688 | */ |
1689 | static int em28xx_v4l2_close(struct inode *inode, struct file *filp) | 1689 | static int em28xx_v4l2_close(struct file *filp) |
1690 | { | 1690 | { |
1691 | struct em28xx_fh *fh = filp->private_data; | 1691 | struct em28xx_fh *fh = filp->private_data; |
1692 | struct em28xx *dev = fh->dev; | 1692 | struct em28xx *dev = fh->dev; |
@@ -1826,7 +1826,7 @@ static int em28xx_v4l2_mmap(struct file *filp, struct vm_area_struct *vma) | |||
1826 | return rc; | 1826 | return rc; |
1827 | } | 1827 | } |
1828 | 1828 | ||
1829 | static const struct file_operations em28xx_v4l_fops = { | 1829 | static const struct v4l2_file_operations em28xx_v4l_fops = { |
1830 | .owner = THIS_MODULE, | 1830 | .owner = THIS_MODULE, |
1831 | .open = em28xx_v4l2_open, | 1831 | .open = em28xx_v4l2_open, |
1832 | .release = em28xx_v4l2_close, | 1832 | .release = em28xx_v4l2_close, |
@@ -1834,8 +1834,6 @@ static const struct file_operations em28xx_v4l_fops = { | |||
1834 | .poll = em28xx_v4l2_poll, | 1834 | .poll = em28xx_v4l2_poll, |
1835 | .mmap = em28xx_v4l2_mmap, | 1835 | .mmap = em28xx_v4l2_mmap, |
1836 | .ioctl = video_ioctl2, | 1836 | .ioctl = video_ioctl2, |
1837 | .llseek = no_llseek, | ||
1838 | .compat_ioctl = v4l_compat_ioctl32, | ||
1839 | }; | 1837 | }; |
1840 | 1838 | ||
1841 | static const struct v4l2_ioctl_ops video_ioctl_ops = { | 1839 | static const struct v4l2_ioctl_ops video_ioctl_ops = { |
@@ -1890,13 +1888,11 @@ static const struct video_device em28xx_video_template = { | |||
1890 | .current_norm = V4L2_STD_PAL, | 1888 | .current_norm = V4L2_STD_PAL, |
1891 | }; | 1889 | }; |
1892 | 1890 | ||
1893 | static const struct file_operations radio_fops = { | 1891 | static const struct v4l2_file_operations radio_fops = { |
1894 | .owner = THIS_MODULE, | 1892 | .owner = THIS_MODULE, |
1895 | .open = em28xx_v4l2_open, | 1893 | .open = em28xx_v4l2_open, |
1896 | .release = em28xx_v4l2_close, | 1894 | .release = em28xx_v4l2_close, |
1897 | .ioctl = video_ioctl2, | 1895 | .ioctl = video_ioctl2, |
1898 | .compat_ioctl = v4l_compat_ioctl32, | ||
1899 | .llseek = no_llseek, | ||
1900 | }; | 1896 | }; |
1901 | 1897 | ||
1902 | static const struct v4l2_ioctl_ops radio_ioctl_ops = { | 1898 | static const struct v4l2_ioctl_ops radio_ioctl_ops = { |
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h index b5eddc26388e..afc5f6d17e0f 100644 --- a/drivers/media/video/em28xx/em28xx.h +++ b/drivers/media/video/em28xx/em28xx.h | |||
@@ -583,7 +583,7 @@ int em28xx_gpio_set(struct em28xx *dev, struct em28xx_reg_seq *gpio); | |||
583 | void em28xx_wake_i2c(struct em28xx *dev); | 583 | void em28xx_wake_i2c(struct em28xx *dev); |
584 | void em28xx_remove_from_devlist(struct em28xx *dev); | 584 | void em28xx_remove_from_devlist(struct em28xx *dev); |
585 | void em28xx_add_into_devlist(struct em28xx *dev); | 585 | void em28xx_add_into_devlist(struct em28xx *dev); |
586 | struct em28xx *em28xx_get_device(struct inode *inode, | 586 | struct em28xx *em28xx_get_device(int minor, |
587 | enum v4l2_buf_type *fh_type, | 587 | enum v4l2_buf_type *fh_type, |
588 | int *has_radio); | 588 | int *has_radio); |
589 | int em28xx_register_extension(struct em28xx_ops *dev); | 589 | int em28xx_register_extension(struct em28xx_ops *dev); |
diff --git a/drivers/media/video/et61x251/et61x251_core.c b/drivers/media/video/et61x251/et61x251_core.c index 83c07112c59d..3aeb8791a5bd 100644 --- a/drivers/media/video/et61x251/et61x251_core.c +++ b/drivers/media/video/et61x251/et61x251_core.c | |||
@@ -1206,7 +1206,7 @@ static void et61x251_release_resources(struct kref *kref) | |||
1206 | } | 1206 | } |
1207 | 1207 | ||
1208 | 1208 | ||
1209 | static int et61x251_open(struct inode* inode, struct file* filp) | 1209 | static int et61x251_open(struct file *filp) |
1210 | { | 1210 | { |
1211 | struct et61x251_device* cam; | 1211 | struct et61x251_device* cam; |
1212 | int err = 0; | 1212 | int err = 0; |
@@ -1291,7 +1291,7 @@ out: | |||
1291 | } | 1291 | } |
1292 | 1292 | ||
1293 | 1293 | ||
1294 | static int et61x251_release(struct inode* inode, struct file* filp) | 1294 | static int et61x251_release(struct file *filp) |
1295 | { | 1295 | { |
1296 | struct et61x251_device* cam; | 1296 | struct et61x251_device* cam; |
1297 | 1297 | ||
@@ -2392,8 +2392,8 @@ et61x251_vidioc_s_parm(struct et61x251_device* cam, void __user * arg) | |||
2392 | } | 2392 | } |
2393 | 2393 | ||
2394 | 2394 | ||
2395 | static int et61x251_ioctl_v4l2(struct inode* inode, struct file* filp, | 2395 | static int et61x251_ioctl_v4l2(struct file *filp, |
2396 | unsigned int cmd, void __user * arg) | 2396 | unsigned int cmd, void __user *arg) |
2397 | { | 2397 | { |
2398 | struct et61x251_device *cam = video_drvdata(filp); | 2398 | struct et61x251_device *cam = video_drvdata(filp); |
2399 | 2399 | ||
@@ -2487,7 +2487,7 @@ static int et61x251_ioctl_v4l2(struct inode* inode, struct file* filp, | |||
2487 | } | 2487 | } |
2488 | 2488 | ||
2489 | 2489 | ||
2490 | static int et61x251_ioctl(struct inode* inode, struct file* filp, | 2490 | static int et61x251_ioctl(struct file *filp, |
2491 | unsigned int cmd, unsigned long arg) | 2491 | unsigned int cmd, unsigned long arg) |
2492 | { | 2492 | { |
2493 | struct et61x251_device *cam = video_drvdata(filp); | 2493 | struct et61x251_device *cam = video_drvdata(filp); |
@@ -2511,7 +2511,7 @@ static int et61x251_ioctl(struct inode* inode, struct file* filp, | |||
2511 | 2511 | ||
2512 | V4LDBG(3, "et61x251", cmd); | 2512 | V4LDBG(3, "et61x251", cmd); |
2513 | 2513 | ||
2514 | err = et61x251_ioctl_v4l2(inode, filp, cmd, (void __user *)arg); | 2514 | err = et61x251_ioctl_v4l2(filp, cmd, (void __user *)arg); |
2515 | 2515 | ||
2516 | mutex_unlock(&cam->fileop_mutex); | 2516 | mutex_unlock(&cam->fileop_mutex); |
2517 | 2517 | ||
@@ -2519,18 +2519,14 @@ static int et61x251_ioctl(struct inode* inode, struct file* filp, | |||
2519 | } | 2519 | } |
2520 | 2520 | ||
2521 | 2521 | ||
2522 | static const struct file_operations et61x251_fops = { | 2522 | static const struct v4l2_file_operations et61x251_fops = { |
2523 | .owner = THIS_MODULE, | 2523 | .owner = THIS_MODULE, |
2524 | .open = et61x251_open, | 2524 | .open = et61x251_open, |
2525 | .release = et61x251_release, | 2525 | .release = et61x251_release, |
2526 | .ioctl = et61x251_ioctl, | 2526 | .ioctl = et61x251_ioctl, |
2527 | #ifdef CONFIG_COMPAT | ||
2528 | .compat_ioctl = v4l_compat_ioctl32, | ||
2529 | #endif | ||
2530 | .read = et61x251_read, | 2527 | .read = et61x251_read, |
2531 | .poll = et61x251_poll, | 2528 | .poll = et61x251_poll, |
2532 | .mmap = et61x251_mmap, | 2529 | .mmap = et61x251_mmap, |
2533 | .llseek = no_llseek, | ||
2534 | }; | 2530 | }; |
2535 | 2531 | ||
2536 | /*****************************************************************************/ | 2532 | /*****************************************************************************/ |
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c index 8b9f3bde5740..5e36b9a4ae3e 100644 --- a/drivers/media/video/gspca/gspca.c +++ b/drivers/media/video/gspca/gspca.c | |||
@@ -875,7 +875,7 @@ static void gspca_release(struct video_device *vfd) | |||
875 | kfree(gspca_dev); | 875 | kfree(gspca_dev); |
876 | } | 876 | } |
877 | 877 | ||
878 | static int dev_open(struct inode *inode, struct file *file) | 878 | static int dev_open(struct file *file) |
879 | { | 879 | { |
880 | struct gspca_dev *gspca_dev; | 880 | struct gspca_dev *gspca_dev; |
881 | int ret; | 881 | int ret; |
@@ -922,7 +922,7 @@ out: | |||
922 | return ret; | 922 | return ret; |
923 | } | 923 | } |
924 | 924 | ||
925 | static int dev_close(struct inode *inode, struct file *file) | 925 | static int dev_close(struct file *file) |
926 | { | 926 | { |
927 | struct gspca_dev *gspca_dev = file->private_data; | 927 | struct gspca_dev *gspca_dev = file->private_data; |
928 | 928 | ||
@@ -1802,17 +1802,13 @@ out: | |||
1802 | return ret; | 1802 | return ret; |
1803 | } | 1803 | } |
1804 | 1804 | ||
1805 | static struct file_operations dev_fops = { | 1805 | static struct v4l2_file_operations dev_fops = { |
1806 | .owner = THIS_MODULE, | 1806 | .owner = THIS_MODULE, |
1807 | .open = dev_open, | 1807 | .open = dev_open, |
1808 | .release = dev_close, | 1808 | .release = dev_close, |
1809 | .read = dev_read, | 1809 | .read = dev_read, |
1810 | .mmap = dev_mmap, | 1810 | .mmap = dev_mmap, |
1811 | .unlocked_ioctl = __video_ioctl2, | 1811 | .unlocked_ioctl = video_ioctl2, |
1812 | #ifdef CONFIG_COMPAT | ||
1813 | .compat_ioctl = v4l_compat_ioctl32, | ||
1814 | #endif | ||
1815 | .llseek = no_llseek, | ||
1816 | .poll = dev_poll, | 1812 | .poll = dev_poll, |
1817 | }; | 1813 | }; |
1818 | 1814 | ||
diff --git a/drivers/media/video/ivtv/ivtv-fileops.c b/drivers/media/video/ivtv/ivtv-fileops.c index 5eb587592e9d..d594bc29f07f 100644 --- a/drivers/media/video/ivtv/ivtv-fileops.c +++ b/drivers/media/video/ivtv/ivtv-fileops.c | |||
@@ -831,7 +831,7 @@ static void ivtv_stop_decoding(struct ivtv_open_id *id, int flags, u64 pts) | |||
831 | ivtv_release_stream(s); | 831 | ivtv_release_stream(s); |
832 | } | 832 | } |
833 | 833 | ||
834 | int ivtv_v4l2_close(struct inode *inode, struct file *filp) | 834 | int ivtv_v4l2_close(struct file *filp) |
835 | { | 835 | { |
836 | struct ivtv_open_id *id = filp->private_data; | 836 | struct ivtv_open_id *id = filp->private_data; |
837 | struct ivtv *itv = id->itv; | 837 | struct ivtv *itv = id->itv; |
@@ -978,7 +978,7 @@ static int ivtv_serialized_open(struct ivtv_stream *s, struct file *filp) | |||
978 | return 0; | 978 | return 0; |
979 | } | 979 | } |
980 | 980 | ||
981 | int ivtv_v4l2_open(struct inode *inode, struct file *filp) | 981 | int ivtv_v4l2_open(struct file *filp) |
982 | { | 982 | { |
983 | int res; | 983 | int res; |
984 | struct ivtv *itv = NULL; | 984 | struct ivtv *itv = NULL; |
diff --git a/drivers/media/video/ivtv/ivtv-fileops.h b/drivers/media/video/ivtv/ivtv-fileops.h index df81e790147f..049a2923965d 100644 --- a/drivers/media/video/ivtv/ivtv-fileops.h +++ b/drivers/media/video/ivtv/ivtv-fileops.h | |||
@@ -22,12 +22,12 @@ | |||
22 | #define IVTV_FILEOPS_H | 22 | #define IVTV_FILEOPS_H |
23 | 23 | ||
24 | /* Testing/Debugging */ | 24 | /* Testing/Debugging */ |
25 | int ivtv_v4l2_open(struct inode *inode, struct file *filp); | 25 | int ivtv_v4l2_open(struct file *filp); |
26 | ssize_t ivtv_v4l2_read(struct file *filp, char __user *buf, size_t count, | 26 | ssize_t ivtv_v4l2_read(struct file *filp, char __user *buf, size_t count, |
27 | loff_t * pos); | 27 | loff_t * pos); |
28 | ssize_t ivtv_v4l2_write(struct file *filp, const char __user *buf, size_t count, | 28 | ssize_t ivtv_v4l2_write(struct file *filp, const char __user *buf, size_t count, |
29 | loff_t * pos); | 29 | loff_t * pos); |
30 | int ivtv_v4l2_close(struct inode *inode, struct file *filp); | 30 | int ivtv_v4l2_close(struct file *filp); |
31 | unsigned int ivtv_v4l2_enc_poll(struct file *filp, poll_table * wait); | 31 | unsigned int ivtv_v4l2_enc_poll(struct file *filp, poll_table * wait); |
32 | unsigned int ivtv_v4l2_dec_poll(struct file *filp, poll_table * wait); | 32 | unsigned int ivtv_v4l2_dec_poll(struct file *filp, poll_table * wait); |
33 | int ivtv_start_capture(struct ivtv_open_id *id); | 33 | int ivtv_start_capture(struct ivtv_open_id *id); |
diff --git a/drivers/media/video/ivtv/ivtv-ioctl.c b/drivers/media/video/ivtv/ivtv-ioctl.c index cd990a4b81a9..a6cd02460e75 100644 --- a/drivers/media/video/ivtv/ivtv-ioctl.c +++ b/drivers/media/video/ivtv/ivtv-ioctl.c | |||
@@ -1827,7 +1827,7 @@ static long ivtv_serialized_ioctl(struct ivtv *itv, struct file *filp, | |||
1827 | 1827 | ||
1828 | if (ivtv_debug & IVTV_DBGFLG_IOCTL) | 1828 | if (ivtv_debug & IVTV_DBGFLG_IOCTL) |
1829 | vfd->debug = V4L2_DEBUG_IOCTL | V4L2_DEBUG_IOCTL_ARG; | 1829 | vfd->debug = V4L2_DEBUG_IOCTL | V4L2_DEBUG_IOCTL_ARG; |
1830 | ret = __video_ioctl2(filp, cmd, arg); | 1830 | ret = video_ioctl2(filp, cmd, arg); |
1831 | vfd->debug = 0; | 1831 | vfd->debug = 0; |
1832 | return ret; | 1832 | return ret; |
1833 | } | 1833 | } |
diff --git a/drivers/media/video/ivtv/ivtv-streams.c b/drivers/media/video/ivtv/ivtv-streams.c index f77d764707b2..854a950af78c 100644 --- a/drivers/media/video/ivtv/ivtv-streams.c +++ b/drivers/media/video/ivtv/ivtv-streams.c | |||
@@ -43,24 +43,22 @@ | |||
43 | #include "ivtv-cards.h" | 43 | #include "ivtv-cards.h" |
44 | #include "ivtv-streams.h" | 44 | #include "ivtv-streams.h" |
45 | 45 | ||
46 | static const struct file_operations ivtv_v4l2_enc_fops = { | 46 | static const struct v4l2_file_operations ivtv_v4l2_enc_fops = { |
47 | .owner = THIS_MODULE, | 47 | .owner = THIS_MODULE, |
48 | .read = ivtv_v4l2_read, | 48 | .read = ivtv_v4l2_read, |
49 | .write = ivtv_v4l2_write, | 49 | .write = ivtv_v4l2_write, |
50 | .open = ivtv_v4l2_open, | 50 | .open = ivtv_v4l2_open, |
51 | .unlocked_ioctl = ivtv_v4l2_ioctl, | 51 | .unlocked_ioctl = ivtv_v4l2_ioctl, |
52 | .compat_ioctl = v4l_compat_ioctl32, | ||
53 | .release = ivtv_v4l2_close, | 52 | .release = ivtv_v4l2_close, |
54 | .poll = ivtv_v4l2_enc_poll, | 53 | .poll = ivtv_v4l2_enc_poll, |
55 | }; | 54 | }; |
56 | 55 | ||
57 | static const struct file_operations ivtv_v4l2_dec_fops = { | 56 | static const struct v4l2_file_operations ivtv_v4l2_dec_fops = { |
58 | .owner = THIS_MODULE, | 57 | .owner = THIS_MODULE, |
59 | .read = ivtv_v4l2_read, | 58 | .read = ivtv_v4l2_read, |
60 | .write = ivtv_v4l2_write, | 59 | .write = ivtv_v4l2_write, |
61 | .open = ivtv_v4l2_open, | 60 | .open = ivtv_v4l2_open, |
62 | .unlocked_ioctl = ivtv_v4l2_ioctl, | 61 | .unlocked_ioctl = ivtv_v4l2_ioctl, |
63 | .compat_ioctl = v4l_compat_ioctl32, | ||
64 | .release = ivtv_v4l2_close, | 62 | .release = ivtv_v4l2_close, |
65 | .poll = ivtv_v4l2_dec_poll, | 63 | .poll = ivtv_v4l2_dec_poll, |
66 | }; | 64 | }; |
@@ -78,7 +76,7 @@ static struct { | |||
78 | int num_offset; | 76 | int num_offset; |
79 | int dma, pio; | 77 | int dma, pio; |
80 | enum v4l2_buf_type buf_type; | 78 | enum v4l2_buf_type buf_type; |
81 | const struct file_operations *fops; | 79 | const struct v4l2_file_operations *fops; |
82 | } ivtv_stream_info[] = { | 80 | } ivtv_stream_info[] = { |
83 | { /* IVTV_ENC_STREAM_TYPE_MPG */ | 81 | { /* IVTV_ENC_STREAM_TYPE_MPG */ |
84 | "encoder MPG", | 82 | "encoder MPG", |
diff --git a/drivers/media/video/meye.c b/drivers/media/video/meye.c index 6418f4a78f2a..c408e615c415 100644 --- a/drivers/media/video/meye.c +++ b/drivers/media/video/meye.c | |||
@@ -841,7 +841,7 @@ again: | |||
841 | /* video4linux integration */ | 841 | /* video4linux integration */ |
842 | /****************************************************************************/ | 842 | /****************************************************************************/ |
843 | 843 | ||
844 | static int meye_open(struct inode *inode, struct file *file) | 844 | static int meye_open(struct file *file) |
845 | { | 845 | { |
846 | int i; | 846 | int i; |
847 | 847 | ||
@@ -863,7 +863,7 @@ static int meye_open(struct inode *inode, struct file *file) | |||
863 | return 0; | 863 | return 0; |
864 | } | 864 | } |
865 | 865 | ||
866 | static int meye_release(struct inode *inode, struct file *file) | 866 | static int meye_release(struct file *file) |
867 | { | 867 | { |
868 | mchip_hic_stop(); | 868 | mchip_hic_stop(); |
869 | mchip_dma_free(); | 869 | mchip_dma_free(); |
@@ -1684,17 +1684,13 @@ static int meye_mmap(struct file *file, struct vm_area_struct *vma) | |||
1684 | return 0; | 1684 | return 0; |
1685 | } | 1685 | } |
1686 | 1686 | ||
1687 | static const struct file_operations meye_fops = { | 1687 | static const struct v4l2_file_operations meye_fops = { |
1688 | .owner = THIS_MODULE, | 1688 | .owner = THIS_MODULE, |
1689 | .open = meye_open, | 1689 | .open = meye_open, |
1690 | .release = meye_release, | 1690 | .release = meye_release, |
1691 | .mmap = meye_mmap, | 1691 | .mmap = meye_mmap, |
1692 | .ioctl = video_ioctl2, | 1692 | .ioctl = video_ioctl2, |
1693 | #ifdef CONFIG_COMPAT | ||
1694 | .compat_ioctl = v4l_compat_ioctl32, | ||
1695 | #endif | ||
1696 | .poll = meye_poll, | 1693 | .poll = meye_poll, |
1697 | .llseek = no_llseek, | ||
1698 | }; | 1694 | }; |
1699 | 1695 | ||
1700 | static const struct v4l2_ioctl_ops meye_ioctl_ops = { | 1696 | static const struct v4l2_ioctl_ops meye_ioctl_ops = { |
diff --git a/drivers/media/video/omap24xxcam.c b/drivers/media/video/omap24xxcam.c index 85c3c7c92af1..73eb656acfe3 100644 --- a/drivers/media/video/omap24xxcam.c +++ b/drivers/media/video/omap24xxcam.c | |||
@@ -1454,9 +1454,9 @@ static int omap24xxcam_mmap(struct file *file, struct vm_area_struct *vma) | |||
1454 | return rval; | 1454 | return rval; |
1455 | } | 1455 | } |
1456 | 1456 | ||
1457 | static int omap24xxcam_open(struct inode *inode, struct file *file) | 1457 | static int omap24xxcam_open(struct file *file) |
1458 | { | 1458 | { |
1459 | int minor = iminor(inode); | 1459 | int minor = video_devdata(file)->minor; |
1460 | struct omap24xxcam_device *cam = omap24xxcam.priv; | 1460 | struct omap24xxcam_device *cam = omap24xxcam.priv; |
1461 | struct omap24xxcam_fh *fh; | 1461 | struct omap24xxcam_fh *fh; |
1462 | struct v4l2_format format; | 1462 | struct v4l2_format format; |
@@ -1511,7 +1511,7 @@ out_try_module_get: | |||
1511 | return -ENODEV; | 1511 | return -ENODEV; |
1512 | } | 1512 | } |
1513 | 1513 | ||
1514 | static int omap24xxcam_release(struct inode *inode, struct file *file) | 1514 | static int omap24xxcam_release(struct file *file) |
1515 | { | 1515 | { |
1516 | struct omap24xxcam_fh *fh = file->private_data; | 1516 | struct omap24xxcam_fh *fh = file->private_data; |
1517 | struct omap24xxcam_device *cam = fh->cam; | 1517 | struct omap24xxcam_device *cam = fh->cam; |
@@ -1559,8 +1559,7 @@ static int omap24xxcam_release(struct inode *inode, struct file *file) | |||
1559 | return 0; | 1559 | return 0; |
1560 | } | 1560 | } |
1561 | 1561 | ||
1562 | static struct file_operations omap24xxcam_fops = { | 1562 | static struct v4l2_file_operations omap24xxcam_fops = { |
1563 | .llseek = no_llseek, | ||
1564 | .ioctl = video_ioctl2, | 1563 | .ioctl = video_ioctl2, |
1565 | .poll = omap24xxcam_poll, | 1564 | .poll = omap24xxcam_poll, |
1566 | .mmap = omap24xxcam_mmap, | 1565 | .mmap = omap24xxcam_mmap, |
diff --git a/drivers/media/video/ov511.c b/drivers/media/video/ov511.c index 6ee9b69cc4a9..f1754dc5587e 100644 --- a/drivers/media/video/ov511.c +++ b/drivers/media/video/ov511.c | |||
@@ -3915,7 +3915,7 @@ ov51x_dealloc(struct usb_ov511 *ov) | |||
3915 | ***************************************************************************/ | 3915 | ***************************************************************************/ |
3916 | 3916 | ||
3917 | static int | 3917 | static int |
3918 | ov51x_v4l1_open(struct inode *inode, struct file *file) | 3918 | ov51x_v4l1_open(struct file *file) |
3919 | { | 3919 | { |
3920 | struct video_device *vdev = video_devdata(file); | 3920 | struct video_device *vdev = video_devdata(file); |
3921 | struct usb_ov511 *ov = video_get_drvdata(vdev); | 3921 | struct usb_ov511 *ov = video_get_drvdata(vdev); |
@@ -3972,7 +3972,7 @@ out: | |||
3972 | } | 3972 | } |
3973 | 3973 | ||
3974 | static int | 3974 | static int |
3975 | ov51x_v4l1_close(struct inode *inode, struct file *file) | 3975 | ov51x_v4l1_close(struct file *file) |
3976 | { | 3976 | { |
3977 | struct video_device *vdev = file->private_data; | 3977 | struct video_device *vdev = file->private_data; |
3978 | struct usb_ov511 *ov = video_get_drvdata(vdev); | 3978 | struct usb_ov511 *ov = video_get_drvdata(vdev); |
@@ -4450,7 +4450,7 @@ redo: | |||
4450 | } | 4450 | } |
4451 | 4451 | ||
4452 | static int | 4452 | static int |
4453 | ov51x_v4l1_ioctl(struct inode *inode, struct file *file, | 4453 | ov51x_v4l1_ioctl(struct file *file, |
4454 | unsigned int cmd, unsigned long arg) | 4454 | unsigned int cmd, unsigned long arg) |
4455 | { | 4455 | { |
4456 | struct video_device *vdev = file->private_data; | 4456 | struct video_device *vdev = file->private_data; |
@@ -4661,17 +4661,13 @@ ov51x_v4l1_mmap(struct file *file, struct vm_area_struct *vma) | |||
4661 | return 0; | 4661 | return 0; |
4662 | } | 4662 | } |
4663 | 4663 | ||
4664 | static const struct file_operations ov511_fops = { | 4664 | static const struct v4l2_file_operations ov511_fops = { |
4665 | .owner = THIS_MODULE, | 4665 | .owner = THIS_MODULE, |
4666 | .open = ov51x_v4l1_open, | 4666 | .open = ov51x_v4l1_open, |
4667 | .release = ov51x_v4l1_close, | 4667 | .release = ov51x_v4l1_close, |
4668 | .read = ov51x_v4l1_read, | 4668 | .read = ov51x_v4l1_read, |
4669 | .mmap = ov51x_v4l1_mmap, | 4669 | .mmap = ov51x_v4l1_mmap, |
4670 | .ioctl = ov51x_v4l1_ioctl, | 4670 | .ioctl = ov51x_v4l1_ioctl, |
4671 | #ifdef CONFIG_COMPAT | ||
4672 | .compat_ioctl = v4l_compat_ioctl32, | ||
4673 | #endif | ||
4674 | .llseek = no_llseek, | ||
4675 | }; | 4671 | }; |
4676 | 4672 | ||
4677 | static struct video_device vdev_template = { | 4673 | static struct video_device vdev_template = { |
diff --git a/drivers/media/video/pms.c b/drivers/media/video/pms.c index 45730fac1570..24f2b3d9977f 100644 --- a/drivers/media/video/pms.c +++ b/drivers/media/video/pms.c | |||
@@ -862,7 +862,7 @@ static int pms_do_ioctl(struct file *file, unsigned int cmd, void *arg) | |||
862 | return 0; | 862 | return 0; |
863 | } | 863 | } |
864 | 864 | ||
865 | static int pms_ioctl(struct inode *inode, struct file *file, | 865 | static int pms_ioctl(struct file *file, |
866 | unsigned int cmd, unsigned long arg) | 866 | unsigned int cmd, unsigned long arg) |
867 | { | 867 | { |
868 | return video_usercopy(file, cmd, arg, pms_do_ioctl); | 868 | return video_usercopy(file, cmd, arg, pms_do_ioctl); |
@@ -881,7 +881,7 @@ static ssize_t pms_read(struct file *file, char __user *buf, | |||
881 | return len; | 881 | return len; |
882 | } | 882 | } |
883 | 883 | ||
884 | static int pms_exclusive_open(struct inode *inode, struct file *file) | 884 | static int pms_exclusive_open(struct file *file) |
885 | { | 885 | { |
886 | struct video_device *v = video_devdata(file); | 886 | struct video_device *v = video_devdata(file); |
887 | struct pms_device *pd = (struct pms_device *)v; | 887 | struct pms_device *pd = (struct pms_device *)v; |
@@ -889,7 +889,7 @@ static int pms_exclusive_open(struct inode *inode, struct file *file) | |||
889 | return test_and_set_bit(0, &pd->in_use) ? -EBUSY : 0; | 889 | return test_and_set_bit(0, &pd->in_use) ? -EBUSY : 0; |
890 | } | 890 | } |
891 | 891 | ||
892 | static int pms_exclusive_release(struct inode *inode, struct file *file) | 892 | static int pms_exclusive_release(struct file *file) |
893 | { | 893 | { |
894 | struct video_device *v = video_devdata(file); | 894 | struct video_device *v = video_devdata(file); |
895 | struct pms_device *pd = (struct pms_device *)v; | 895 | struct pms_device *pd = (struct pms_device *)v; |
@@ -898,16 +898,12 @@ static int pms_exclusive_release(struct inode *inode, struct file *file) | |||
898 | return 0; | 898 | return 0; |
899 | } | 899 | } |
900 | 900 | ||
901 | static const struct file_operations pms_fops = { | 901 | static const struct v4l2_file_operations pms_fops = { |
902 | .owner = THIS_MODULE, | 902 | .owner = THIS_MODULE, |
903 | .open = pms_exclusive_open, | 903 | .open = pms_exclusive_open, |
904 | .release = pms_exclusive_release, | 904 | .release = pms_exclusive_release, |
905 | .ioctl = pms_ioctl, | 905 | .ioctl = pms_ioctl, |
906 | #ifdef CONFIG_COMPAT | ||
907 | .compat_ioctl = v4l_compat_ioctl32, | ||
908 | #endif | ||
909 | .read = pms_read, | 906 | .read = pms_read, |
910 | .llseek = no_llseek, | ||
911 | }; | 907 | }; |
912 | 908 | ||
913 | static struct video_device pms_template= | 909 | static struct video_device pms_template= |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c index 52af1c435965..50554b44d355 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c +++ b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c | |||
@@ -948,7 +948,7 @@ static void pvr2_v4l2_internal_check(struct pvr2_channel *chp) | |||
948 | } | 948 | } |
949 | 949 | ||
950 | 950 | ||
951 | static int pvr2_v4l2_ioctl(struct inode *inode, struct file *file, | 951 | static int pvr2_v4l2_ioctl(struct file *file, |
952 | unsigned int cmd, unsigned long arg) | 952 | unsigned int cmd, unsigned long arg) |
953 | { | 953 | { |
954 | 954 | ||
@@ -960,7 +960,7 @@ static int pvr2_v4l2_ioctl(struct inode *inode, struct file *file, | |||
960 | } | 960 | } |
961 | 961 | ||
962 | 962 | ||
963 | static int pvr2_v4l2_release(struct inode *inode, struct file *file) | 963 | static int pvr2_v4l2_release(struct file *file) |
964 | { | 964 | { |
965 | struct pvr2_v4l2_fh *fhp = file->private_data; | 965 | struct pvr2_v4l2_fh *fhp = file->private_data; |
966 | struct pvr2_v4l2 *vp = fhp->vhead; | 966 | struct pvr2_v4l2 *vp = fhp->vhead; |
@@ -1008,7 +1008,7 @@ static int pvr2_v4l2_release(struct inode *inode, struct file *file) | |||
1008 | } | 1008 | } |
1009 | 1009 | ||
1010 | 1010 | ||
1011 | static int pvr2_v4l2_open(struct inode *inode, struct file *file) | 1011 | static int pvr2_v4l2_open(struct file *file) |
1012 | { | 1012 | { |
1013 | struct pvr2_v4l2_dev *dip; /* Our own context pointer */ | 1013 | struct pvr2_v4l2_dev *dip; /* Our own context pointer */ |
1014 | struct pvr2_v4l2_fh *fhp; | 1014 | struct pvr2_v4l2_fh *fhp; |
@@ -1235,13 +1235,12 @@ static unsigned int pvr2_v4l2_poll(struct file *file, poll_table *wait) | |||
1235 | } | 1235 | } |
1236 | 1236 | ||
1237 | 1237 | ||
1238 | static const struct file_operations vdev_fops = { | 1238 | static const struct v4l2_file_operations vdev_fops = { |
1239 | .owner = THIS_MODULE, | 1239 | .owner = THIS_MODULE, |
1240 | .open = pvr2_v4l2_open, | 1240 | .open = pvr2_v4l2_open, |
1241 | .release = pvr2_v4l2_release, | 1241 | .release = pvr2_v4l2_release, |
1242 | .read = pvr2_v4l2_read, | 1242 | .read = pvr2_v4l2_read, |
1243 | .ioctl = pvr2_v4l2_ioctl, | 1243 | .ioctl = pvr2_v4l2_ioctl, |
1244 | .llseek = no_llseek, | ||
1245 | .poll = pvr2_v4l2_poll, | 1244 | .poll = pvr2_v4l2_poll, |
1246 | }; | 1245 | }; |
1247 | 1246 | ||
diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c index 1ce9da167b7e..315337bfd673 100644 --- a/drivers/media/video/pwc/pwc-if.c +++ b/drivers/media/video/pwc/pwc-if.c | |||
@@ -142,16 +142,16 @@ static struct { | |||
142 | 142 | ||
143 | /***/ | 143 | /***/ |
144 | 144 | ||
145 | static int pwc_video_open(struct inode *inode, struct file *file); | 145 | static int pwc_video_open(struct file *file); |
146 | static int pwc_video_close(struct inode *inode, struct file *file); | 146 | static int pwc_video_close(struct file *file); |
147 | static ssize_t pwc_video_read(struct file *file, char __user *buf, | 147 | static ssize_t pwc_video_read(struct file *file, char __user *buf, |
148 | size_t count, loff_t *ppos); | 148 | size_t count, loff_t *ppos); |
149 | static unsigned int pwc_video_poll(struct file *file, poll_table *wait); | 149 | static unsigned int pwc_video_poll(struct file *file, poll_table *wait); |
150 | static int pwc_video_ioctl(struct inode *inode, struct file *file, | 150 | static int pwc_video_ioctl(struct file *file, |
151 | unsigned int ioctlnr, unsigned long arg); | 151 | unsigned int ioctlnr, unsigned long arg); |
152 | static int pwc_video_mmap(struct file *file, struct vm_area_struct *vma); | 152 | static int pwc_video_mmap(struct file *file, struct vm_area_struct *vma); |
153 | 153 | ||
154 | static const struct file_operations pwc_fops = { | 154 | static const struct v4l2_file_operations pwc_fops = { |
155 | .owner = THIS_MODULE, | 155 | .owner = THIS_MODULE, |
156 | .open = pwc_video_open, | 156 | .open = pwc_video_open, |
157 | .release = pwc_video_close, | 157 | .release = pwc_video_close, |
@@ -159,10 +159,6 @@ static const struct file_operations pwc_fops = { | |||
159 | .poll = pwc_video_poll, | 159 | .poll = pwc_video_poll, |
160 | .mmap = pwc_video_mmap, | 160 | .mmap = pwc_video_mmap, |
161 | .ioctl = pwc_video_ioctl, | 161 | .ioctl = pwc_video_ioctl, |
162 | #ifdef CONFIG_COMPAT | ||
163 | .compat_ioctl = v4l_compat_ioctl32, | ||
164 | #endif | ||
165 | .llseek = no_llseek, | ||
166 | }; | 162 | }; |
167 | static struct video_device pwc_template = { | 163 | static struct video_device pwc_template = { |
168 | .name = "Philips Webcam", /* Filled in later */ | 164 | .name = "Philips Webcam", /* Filled in later */ |
@@ -1104,7 +1100,7 @@ static const char *pwc_sensor_type_to_string(unsigned int sensor_type) | |||
1104 | /***************************************************************************/ | 1100 | /***************************************************************************/ |
1105 | /* Video4Linux functions */ | 1101 | /* Video4Linux functions */ |
1106 | 1102 | ||
1107 | static int pwc_video_open(struct inode *inode, struct file *file) | 1103 | static int pwc_video_open(struct file *file) |
1108 | { | 1104 | { |
1109 | int i, ret; | 1105 | int i, ret; |
1110 | struct video_device *vdev = video_devdata(file); | 1106 | struct video_device *vdev = video_devdata(file); |
@@ -1224,7 +1220,7 @@ static void pwc_cleanup(struct pwc_device *pdev) | |||
1224 | } | 1220 | } |
1225 | 1221 | ||
1226 | /* Note that all cleanup is done in the reverse order as in _open */ | 1222 | /* Note that all cleanup is done in the reverse order as in _open */ |
1227 | static int pwc_video_close(struct inode *inode, struct file *file) | 1223 | static int pwc_video_close(struct file *file) |
1228 | { | 1224 | { |
1229 | struct video_device *vdev = file->private_data; | 1225 | struct video_device *vdev = file->private_data; |
1230 | struct pwc_device *pdev; | 1226 | struct pwc_device *pdev; |
@@ -1399,7 +1395,7 @@ static unsigned int pwc_video_poll(struct file *file, poll_table *wait) | |||
1399 | return 0; | 1395 | return 0; |
1400 | } | 1396 | } |
1401 | 1397 | ||
1402 | static int pwc_video_ioctl(struct inode *inode, struct file *file, | 1398 | static int pwc_video_ioctl(struct file *file, |
1403 | unsigned int cmd, unsigned long arg) | 1399 | unsigned int cmd, unsigned long arg) |
1404 | { | 1400 | { |
1405 | struct video_device *vdev = file->private_data; | 1401 | struct video_device *vdev = file->private_data; |
diff --git a/drivers/media/video/s2255drv.c b/drivers/media/video/s2255drv.c index 3c3f8cf73108..13f85ad363cd 100644 --- a/drivers/media/video/s2255drv.c +++ b/drivers/media/video/s2255drv.c | |||
@@ -1502,9 +1502,9 @@ static int vidioc_s_jpegcomp(struct file *file, void *priv, | |||
1502 | dprintk(2, "setting jpeg quality %d\n", jc->quality); | 1502 | dprintk(2, "setting jpeg quality %d\n", jc->quality); |
1503 | return 0; | 1503 | return 0; |
1504 | } | 1504 | } |
1505 | static int s2255_open(struct inode *inode, struct file *file) | 1505 | static int s2255_open(struct file *file) |
1506 | { | 1506 | { |
1507 | int minor = iminor(inode); | 1507 | int minor = video_devdata(file)->minor; |
1508 | struct s2255_dev *h, *dev = NULL; | 1508 | struct s2255_dev *h, *dev = NULL; |
1509 | struct s2255_fh *fh; | 1509 | struct s2255_fh *fh; |
1510 | struct list_head *list; | 1510 | struct list_head *list; |
@@ -1711,11 +1711,11 @@ static void s2255_destroy(struct kref *kref) | |||
1711 | mutex_unlock(&dev->open_lock); | 1711 | mutex_unlock(&dev->open_lock); |
1712 | } | 1712 | } |
1713 | 1713 | ||
1714 | static int s2255_close(struct inode *inode, struct file *file) | 1714 | static int s2255_close(struct file *file) |
1715 | { | 1715 | { |
1716 | struct s2255_fh *fh = file->private_data; | 1716 | struct s2255_fh *fh = file->private_data; |
1717 | struct s2255_dev *dev = fh->dev; | 1717 | struct s2255_dev *dev = fh->dev; |
1718 | int minor = iminor(inode); | 1718 | int minor = video_devdata(file)->minor; |
1719 | if (!dev) | 1719 | if (!dev) |
1720 | return -ENODEV; | 1720 | return -ENODEV; |
1721 | 1721 | ||
@@ -1759,15 +1759,13 @@ static int s2255_mmap_v4l(struct file *file, struct vm_area_struct *vma) | |||
1759 | return ret; | 1759 | return ret; |
1760 | } | 1760 | } |
1761 | 1761 | ||
1762 | static const struct file_operations s2255_fops_v4l = { | 1762 | static const struct v4l2_file_operations s2255_fops_v4l = { |
1763 | .owner = THIS_MODULE, | 1763 | .owner = THIS_MODULE, |
1764 | .open = s2255_open, | 1764 | .open = s2255_open, |
1765 | .release = s2255_close, | 1765 | .release = s2255_close, |
1766 | .poll = s2255_poll, | 1766 | .poll = s2255_poll, |
1767 | .ioctl = video_ioctl2, /* V4L2 ioctl handler */ | 1767 | .ioctl = video_ioctl2, /* V4L2 ioctl handler */ |
1768 | .compat_ioctl = v4l_compat_ioctl32, | ||
1769 | .mmap = s2255_mmap_v4l, | 1768 | .mmap = s2255_mmap_v4l, |
1770 | .llseek = no_llseek, | ||
1771 | }; | 1769 | }; |
1772 | 1770 | ||
1773 | static const struct v4l2_ioctl_ops s2255_ioctl_ops = { | 1771 | static const struct v4l2_ioctl_ops s2255_ioctl_ops = { |
diff --git a/drivers/media/video/saa5246a.c b/drivers/media/video/saa5246a.c index f159441e9375..018dee55b3aa 100644 --- a/drivers/media/video/saa5246a.c +++ b/drivers/media/video/saa5246a.c | |||
@@ -944,7 +944,7 @@ static inline unsigned int vtx_fix_command(unsigned int cmd) | |||
944 | /* | 944 | /* |
945 | * Handle the locking | 945 | * Handle the locking |
946 | */ | 946 | */ |
947 | static int saa5246a_ioctl(struct inode *inode, struct file *file, | 947 | static int saa5246a_ioctl(struct file *file, |
948 | unsigned int cmd, unsigned long arg) | 948 | unsigned int cmd, unsigned long arg) |
949 | { | 949 | { |
950 | struct saa5246a_device *t = video_drvdata(file); | 950 | struct saa5246a_device *t = video_drvdata(file); |
@@ -957,7 +957,7 @@ static int saa5246a_ioctl(struct inode *inode, struct file *file, | |||
957 | return err; | 957 | return err; |
958 | } | 958 | } |
959 | 959 | ||
960 | static int saa5246a_open(struct inode *inode, struct file *file) | 960 | static int saa5246a_open(struct file *file) |
961 | { | 961 | { |
962 | struct saa5246a_device *t = video_drvdata(file); | 962 | struct saa5246a_device *t = video_drvdata(file); |
963 | 963 | ||
@@ -999,7 +999,7 @@ static int saa5246a_open(struct inode *inode, struct file *file) | |||
999 | return 0; | 999 | return 0; |
1000 | } | 1000 | } |
1001 | 1001 | ||
1002 | static int saa5246a_release(struct inode *inode, struct file *file) | 1002 | static int saa5246a_release(struct file *file) |
1003 | { | 1003 | { |
1004 | struct saa5246a_device *t = video_drvdata(file); | 1004 | struct saa5246a_device *t = video_drvdata(file); |
1005 | 1005 | ||
@@ -1018,12 +1018,11 @@ static int saa5246a_release(struct inode *inode, struct file *file) | |||
1018 | return 0; | 1018 | return 0; |
1019 | } | 1019 | } |
1020 | 1020 | ||
1021 | static const struct file_operations saa_fops = { | 1021 | static const struct v4l2_file_operations saa_fops = { |
1022 | .owner = THIS_MODULE, | 1022 | .owner = THIS_MODULE, |
1023 | .open = saa5246a_open, | 1023 | .open = saa5246a_open, |
1024 | .release = saa5246a_release, | 1024 | .release = saa5246a_release, |
1025 | .ioctl = saa5246a_ioctl, | 1025 | .ioctl = saa5246a_ioctl, |
1026 | .llseek = no_llseek, | ||
1027 | }; | 1026 | }; |
1028 | 1027 | ||
1029 | static struct video_device saa_template = | 1028 | static struct video_device saa_template = |
diff --git a/drivers/media/video/saa5249.c b/drivers/media/video/saa5249.c index 6ef3affb97f1..e73bb738933c 100644 --- a/drivers/media/video/saa5249.c +++ b/drivers/media/video/saa5249.c | |||
@@ -479,7 +479,7 @@ static inline unsigned int vtx_fix_command(unsigned int cmd) | |||
479 | * Handle the locking | 479 | * Handle the locking |
480 | */ | 480 | */ |
481 | 481 | ||
482 | static int saa5249_ioctl(struct inode *inode, struct file *file, | 482 | static int saa5249_ioctl(struct file *file, |
483 | unsigned int cmd, unsigned long arg) | 483 | unsigned int cmd, unsigned long arg) |
484 | { | 484 | { |
485 | struct saa5249_device *t = video_drvdata(file); | 485 | struct saa5249_device *t = video_drvdata(file); |
@@ -492,7 +492,7 @@ static int saa5249_ioctl(struct inode *inode, struct file *file, | |||
492 | return err; | 492 | return err; |
493 | } | 493 | } |
494 | 494 | ||
495 | static int saa5249_open(struct inode *inode, struct file *file) | 495 | static int saa5249_open(struct file *file) |
496 | { | 496 | { |
497 | struct saa5249_device *t = video_drvdata(file); | 497 | struct saa5249_device *t = video_drvdata(file); |
498 | int pgbuf; | 498 | int pgbuf; |
@@ -529,7 +529,7 @@ static int saa5249_open(struct inode *inode, struct file *file) | |||
529 | 529 | ||
530 | 530 | ||
531 | 531 | ||
532 | static int saa5249_release(struct inode *inode, struct file *file) | 532 | static int saa5249_release(struct file *file) |
533 | { | 533 | { |
534 | struct saa5249_device *t = video_drvdata(file); | 534 | struct saa5249_device *t = video_drvdata(file); |
535 | 535 | ||
@@ -539,15 +539,11 @@ static int saa5249_release(struct inode *inode, struct file *file) | |||
539 | return 0; | 539 | return 0; |
540 | } | 540 | } |
541 | 541 | ||
542 | static const struct file_operations saa_fops = { | 542 | static const struct v4l2_file_operations saa_fops = { |
543 | .owner = THIS_MODULE, | 543 | .owner = THIS_MODULE, |
544 | .open = saa5249_open, | 544 | .open = saa5249_open, |
545 | .release = saa5249_release, | 545 | .release = saa5249_release, |
546 | .ioctl = saa5249_ioctl, | 546 | .ioctl = saa5249_ioctl, |
547 | #ifdef CONFIG_COMPAT | ||
548 | .compat_ioctl = v4l_compat_ioctl32, | ||
549 | #endif | ||
550 | .llseek = no_llseek, | ||
551 | }; | 547 | }; |
552 | 548 | ||
553 | static struct video_device saa_template = | 549 | static struct video_device saa_template = |
diff --git a/drivers/media/video/saa7134/saa7134-empress.c b/drivers/media/video/saa7134/saa7134-empress.c index 7f40511bcc04..3beba480137f 100644 --- a/drivers/media/video/saa7134/saa7134-empress.c +++ b/drivers/media/video/saa7134/saa7134-empress.c | |||
@@ -83,9 +83,9 @@ static int ts_init_encoder(struct saa7134_dev* dev) | |||
83 | 83 | ||
84 | /* ------------------------------------------------------------------ */ | 84 | /* ------------------------------------------------------------------ */ |
85 | 85 | ||
86 | static int ts_open(struct inode *inode, struct file *file) | 86 | static int ts_open(struct file *file) |
87 | { | 87 | { |
88 | int minor = iminor(inode); | 88 | int minor = video_devdata(file)->minor; |
89 | struct saa7134_dev *dev; | 89 | struct saa7134_dev *dev; |
90 | int err; | 90 | int err; |
91 | 91 | ||
@@ -119,7 +119,7 @@ done: | |||
119 | return err; | 119 | return err; |
120 | } | 120 | } |
121 | 121 | ||
122 | static int ts_release(struct inode *inode, struct file *file) | 122 | static int ts_release(struct file *file) |
123 | { | 123 | { |
124 | struct saa7134_dev *dev = file->private_data; | 124 | struct saa7134_dev *dev = file->private_data; |
125 | 125 | ||
@@ -437,7 +437,7 @@ static int empress_g_std(struct file *file, void *priv, v4l2_std_id *id) | |||
437 | return 0; | 437 | return 0; |
438 | } | 438 | } |
439 | 439 | ||
440 | static const struct file_operations ts_fops = | 440 | static const struct v4l2_file_operations ts_fops = |
441 | { | 441 | { |
442 | .owner = THIS_MODULE, | 442 | .owner = THIS_MODULE, |
443 | .open = ts_open, | 443 | .open = ts_open, |
@@ -446,7 +446,6 @@ static const struct file_operations ts_fops = | |||
446 | .poll = ts_poll, | 446 | .poll = ts_poll, |
447 | .mmap = ts_mmap, | 447 | .mmap = ts_mmap, |
448 | .ioctl = video_ioctl2, | 448 | .ioctl = video_ioctl2, |
449 | .llseek = no_llseek, | ||
450 | }; | 449 | }; |
451 | 450 | ||
452 | static const struct v4l2_ioctl_ops ts_ioctl_ops = { | 451 | static const struct v4l2_ioctl_ops ts_ioctl_ops = { |
diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c index 02bb6747a39c..6b2ab57538ee 100644 --- a/drivers/media/video/saa7134/saa7134-video.c +++ b/drivers/media/video/saa7134/saa7134-video.c | |||
@@ -1326,9 +1326,9 @@ static int saa7134_resource(struct saa7134_fh *fh) | |||
1326 | return 0; | 1326 | return 0; |
1327 | } | 1327 | } |
1328 | 1328 | ||
1329 | static int video_open(struct inode *inode, struct file *file) | 1329 | static int video_open(struct file *file) |
1330 | { | 1330 | { |
1331 | int minor = iminor(inode); | 1331 | int minor = video_devdata(file)->minor; |
1332 | struct saa7134_dev *dev; | 1332 | struct saa7134_dev *dev; |
1333 | struct saa7134_fh *fh; | 1333 | struct saa7134_fh *fh; |
1334 | enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE; | 1334 | enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE; |
@@ -1462,7 +1462,7 @@ err: | |||
1462 | return POLLERR; | 1462 | return POLLERR; |
1463 | } | 1463 | } |
1464 | 1464 | ||
1465 | static int video_release(struct inode *inode, struct file *file) | 1465 | static int video_release(struct file *file) |
1466 | { | 1466 | { |
1467 | struct saa7134_fh *fh = file->private_data; | 1467 | struct saa7134_fh *fh = file->private_data; |
1468 | struct saa7134_dev *dev = fh->dev; | 1468 | struct saa7134_dev *dev = fh->dev; |
@@ -2377,7 +2377,7 @@ static int radio_queryctrl(struct file *file, void *priv, | |||
2377 | return 0; | 2377 | return 0; |
2378 | } | 2378 | } |
2379 | 2379 | ||
2380 | static const struct file_operations video_fops = | 2380 | static const struct v4l2_file_operations video_fops = |
2381 | { | 2381 | { |
2382 | .owner = THIS_MODULE, | 2382 | .owner = THIS_MODULE, |
2383 | .open = video_open, | 2383 | .open = video_open, |
@@ -2386,8 +2386,6 @@ static const struct file_operations video_fops = | |||
2386 | .poll = video_poll, | 2386 | .poll = video_poll, |
2387 | .mmap = video_mmap, | 2387 | .mmap = video_mmap, |
2388 | .ioctl = video_ioctl2, | 2388 | .ioctl = video_ioctl2, |
2389 | .compat_ioctl = v4l_compat_ioctl32, | ||
2390 | .llseek = no_llseek, | ||
2391 | }; | 2389 | }; |
2392 | 2390 | ||
2393 | static const struct v4l2_ioctl_ops video_ioctl_ops = { | 2391 | static const struct v4l2_ioctl_ops video_ioctl_ops = { |
@@ -2441,13 +2439,11 @@ static const struct v4l2_ioctl_ops video_ioctl_ops = { | |||
2441 | #endif | 2439 | #endif |
2442 | }; | 2440 | }; |
2443 | 2441 | ||
2444 | static const struct file_operations radio_fops = { | 2442 | static const struct v4l2_file_operations radio_fops = { |
2445 | .owner = THIS_MODULE, | 2443 | .owner = THIS_MODULE, |
2446 | .open = video_open, | 2444 | .open = video_open, |
2447 | .release = video_release, | 2445 | .release = video_release, |
2448 | .ioctl = video_ioctl2, | 2446 | .ioctl = video_ioctl2, |
2449 | .compat_ioctl = v4l_compat_ioctl32, | ||
2450 | .llseek = no_llseek, | ||
2451 | }; | 2447 | }; |
2452 | 2448 | ||
2453 | static const struct v4l2_ioctl_ops radio_ioctl_ops = { | 2449 | static const struct v4l2_ioctl_ops radio_ioctl_ops = { |
diff --git a/drivers/media/video/se401.c b/drivers/media/video/se401.c index d652f25eef0e..5b27f323272f 100644 --- a/drivers/media/video/se401.c +++ b/drivers/media/video/se401.c | |||
@@ -932,7 +932,7 @@ static void usb_se401_remove_disconnected (struct usb_se401 *se401) | |||
932 | ***************************************************************************/ | 932 | ***************************************************************************/ |
933 | 933 | ||
934 | 934 | ||
935 | static int se401_open(struct inode *inode, struct file *file) | 935 | static int se401_open(struct file *file) |
936 | { | 936 | { |
937 | struct video_device *dev = video_devdata(file); | 937 | struct video_device *dev = video_devdata(file); |
938 | struct usb_se401 *se401 = (struct usb_se401 *)dev; | 938 | struct usb_se401 *se401 = (struct usb_se401 *)dev; |
@@ -954,7 +954,7 @@ static int se401_open(struct inode *inode, struct file *file) | |||
954 | return err; | 954 | return err; |
955 | } | 955 | } |
956 | 956 | ||
957 | static int se401_close(struct inode *inode, struct file *file) | 957 | static int se401_close(struct file *file) |
958 | { | 958 | { |
959 | struct video_device *dev = file->private_data; | 959 | struct video_device *dev = file->private_data; |
960 | struct usb_se401 *se401 = (struct usb_se401 *)dev; | 960 | struct usb_se401 *se401 = (struct usb_se401 *)dev; |
@@ -1138,7 +1138,7 @@ static int se401_do_ioctl(struct file *file, unsigned int cmd, void *arg) | |||
1138 | return 0; | 1138 | return 0; |
1139 | } | 1139 | } |
1140 | 1140 | ||
1141 | static int se401_ioctl(struct inode *inode, struct file *file, | 1141 | static int se401_ioctl(struct file *file, |
1142 | unsigned int cmd, unsigned long arg) | 1142 | unsigned int cmd, unsigned long arg) |
1143 | { | 1143 | { |
1144 | return video_usercopy(file, cmd, arg, se401_do_ioctl); | 1144 | return video_usercopy(file, cmd, arg, se401_do_ioctl); |
@@ -1222,17 +1222,13 @@ static int se401_mmap(struct file *file, struct vm_area_struct *vma) | |||
1222 | return 0; | 1222 | return 0; |
1223 | } | 1223 | } |
1224 | 1224 | ||
1225 | static const struct file_operations se401_fops = { | 1225 | static const struct v4l2_file_operations se401_fops = { |
1226 | .owner = THIS_MODULE, | 1226 | .owner = THIS_MODULE, |
1227 | .open = se401_open, | 1227 | .open = se401_open, |
1228 | .release = se401_close, | 1228 | .release = se401_close, |
1229 | .read = se401_read, | 1229 | .read = se401_read, |
1230 | .mmap = se401_mmap, | 1230 | .mmap = se401_mmap, |
1231 | .ioctl = se401_ioctl, | 1231 | .ioctl = se401_ioctl, |
1232 | #ifdef CONFIG_COMPAT | ||
1233 | .compat_ioctl = v4l_compat_ioctl32, | ||
1234 | #endif | ||
1235 | .llseek = no_llseek, | ||
1236 | }; | 1232 | }; |
1237 | static struct video_device se401_template = { | 1233 | static struct video_device se401_template = { |
1238 | .name = "se401 USB camera", | 1234 | .name = "se401 USB camera", |
diff --git a/drivers/media/video/sn9c102/sn9c102_core.c b/drivers/media/video/sn9c102/sn9c102_core.c index 01a8efb8deb1..c2582e248fa3 100644 --- a/drivers/media/video/sn9c102/sn9c102_core.c +++ b/drivers/media/video/sn9c102/sn9c102_core.c | |||
@@ -1746,7 +1746,7 @@ static void sn9c102_release_resources(struct kref *kref) | |||
1746 | } | 1746 | } |
1747 | 1747 | ||
1748 | 1748 | ||
1749 | static int sn9c102_open(struct inode* inode, struct file* filp) | 1749 | static int sn9c102_open(struct file *filp) |
1750 | { | 1750 | { |
1751 | struct sn9c102_device* cam; | 1751 | struct sn9c102_device* cam; |
1752 | int err = 0; | 1752 | int err = 0; |
@@ -1857,7 +1857,7 @@ out: | |||
1857 | } | 1857 | } |
1858 | 1858 | ||
1859 | 1859 | ||
1860 | static int sn9c102_release(struct inode* inode, struct file* filp) | 1860 | static int sn9c102_release(struct file *filp) |
1861 | { | 1861 | { |
1862 | struct sn9c102_device* cam; | 1862 | struct sn9c102_device* cam; |
1863 | 1863 | ||
@@ -3092,8 +3092,8 @@ sn9c102_vidioc_s_audio(struct sn9c102_device* cam, void __user * arg) | |||
3092 | } | 3092 | } |
3093 | 3093 | ||
3094 | 3094 | ||
3095 | static int sn9c102_ioctl_v4l2(struct inode* inode, struct file* filp, | 3095 | static int sn9c102_ioctl_v4l2(struct file *filp, |
3096 | unsigned int cmd, void __user * arg) | 3096 | unsigned int cmd, void __user *arg) |
3097 | { | 3097 | { |
3098 | struct sn9c102_device *cam = video_drvdata(filp); | 3098 | struct sn9c102_device *cam = video_drvdata(filp); |
3099 | 3099 | ||
@@ -3196,7 +3196,7 @@ static int sn9c102_ioctl_v4l2(struct inode* inode, struct file* filp, | |||
3196 | } | 3196 | } |
3197 | 3197 | ||
3198 | 3198 | ||
3199 | static int sn9c102_ioctl(struct inode* inode, struct file* filp, | 3199 | static int sn9c102_ioctl(struct file *filp, |
3200 | unsigned int cmd, unsigned long arg) | 3200 | unsigned int cmd, unsigned long arg) |
3201 | { | 3201 | { |
3202 | struct sn9c102_device *cam = video_drvdata(filp); | 3202 | struct sn9c102_device *cam = video_drvdata(filp); |
@@ -3220,7 +3220,7 @@ static int sn9c102_ioctl(struct inode* inode, struct file* filp, | |||
3220 | 3220 | ||
3221 | V4LDBG(3, "sn9c102", cmd); | 3221 | V4LDBG(3, "sn9c102", cmd); |
3222 | 3222 | ||
3223 | err = sn9c102_ioctl_v4l2(inode, filp, cmd, (void __user *)arg); | 3223 | err = sn9c102_ioctl_v4l2(filp, cmd, (void __user *)arg); |
3224 | 3224 | ||
3225 | mutex_unlock(&cam->fileop_mutex); | 3225 | mutex_unlock(&cam->fileop_mutex); |
3226 | 3226 | ||
@@ -3229,18 +3229,14 @@ static int sn9c102_ioctl(struct inode* inode, struct file* filp, | |||
3229 | 3229 | ||
3230 | /*****************************************************************************/ | 3230 | /*****************************************************************************/ |
3231 | 3231 | ||
3232 | static const struct file_operations sn9c102_fops = { | 3232 | static const struct v4l2_file_operations sn9c102_fops = { |
3233 | .owner = THIS_MODULE, | 3233 | .owner = THIS_MODULE, |
3234 | .open = sn9c102_open, | 3234 | .open = sn9c102_open, |
3235 | .release = sn9c102_release, | 3235 | .release = sn9c102_release, |
3236 | .ioctl = sn9c102_ioctl, | 3236 | .ioctl = sn9c102_ioctl, |
3237 | #ifdef CONFIG_COMPAT | ||
3238 | .compat_ioctl = v4l_compat_ioctl32, | ||
3239 | #endif | ||
3240 | .read = sn9c102_read, | 3237 | .read = sn9c102_read, |
3241 | .poll = sn9c102_poll, | 3238 | .poll = sn9c102_poll, |
3242 | .mmap = sn9c102_mmap, | 3239 | .mmap = sn9c102_mmap, |
3243 | .llseek = no_llseek, | ||
3244 | }; | 3240 | }; |
3245 | 3241 | ||
3246 | /*****************************************************************************/ | 3242 | /*****************************************************************************/ |
diff --git a/drivers/media/video/soc_camera.c b/drivers/media/video/soc_camera.c index 90077cb4fe66..9986e02bcf1a 100644 --- a/drivers/media/video/soc_camera.c +++ b/drivers/media/video/soc_camera.c | |||
@@ -256,7 +256,7 @@ static void soc_camera_free_user_formats(struct soc_camera_device *icd) | |||
256 | vfree(icd->user_formats); | 256 | vfree(icd->user_formats); |
257 | } | 257 | } |
258 | 258 | ||
259 | static int soc_camera_open(struct inode *inode, struct file *file) | 259 | static int soc_camera_open(struct file *file) |
260 | { | 260 | { |
261 | struct video_device *vdev; | 261 | struct video_device *vdev; |
262 | struct soc_camera_device *icd; | 262 | struct soc_camera_device *icd; |
@@ -330,7 +330,7 @@ emgd: | |||
330 | return ret; | 330 | return ret; |
331 | } | 331 | } |
332 | 332 | ||
333 | static int soc_camera_close(struct inode *inode, struct file *file) | 333 | static int soc_camera_close(struct file *file) |
334 | { | 334 | { |
335 | struct soc_camera_file *icf = file->private_data; | 335 | struct soc_camera_file *icf = file->private_data; |
336 | struct soc_camera_device *icd = icf->icd; | 336 | struct soc_camera_device *icd = icf->icd; |
@@ -400,7 +400,7 @@ static unsigned int soc_camera_poll(struct file *file, poll_table *pt) | |||
400 | return ici->ops->poll(file, pt); | 400 | return ici->ops->poll(file, pt); |
401 | } | 401 | } |
402 | 402 | ||
403 | static struct file_operations soc_camera_fops = { | 403 | static struct v4l2_file_operations soc_camera_fops = { |
404 | .owner = THIS_MODULE, | 404 | .owner = THIS_MODULE, |
405 | .open = soc_camera_open, | 405 | .open = soc_camera_open, |
406 | .release = soc_camera_close, | 406 | .release = soc_camera_close, |
@@ -408,7 +408,6 @@ static struct file_operations soc_camera_fops = { | |||
408 | .read = soc_camera_read, | 408 | .read = soc_camera_read, |
409 | .mmap = soc_camera_mmap, | 409 | .mmap = soc_camera_mmap, |
410 | .poll = soc_camera_poll, | 410 | .poll = soc_camera_poll, |
411 | .llseek = no_llseek, | ||
412 | }; | 411 | }; |
413 | 412 | ||
414 | static int soc_camera_s_fmt_vid_cap(struct file *file, void *priv, | 413 | static int soc_camera_s_fmt_vid_cap(struct file *file, void *priv, |
diff --git a/drivers/media/video/stk-webcam.c b/drivers/media/video/stk-webcam.c index f9516d0f3c11..26378cf390fc 100644 --- a/drivers/media/video/stk-webcam.c +++ b/drivers/media/video/stk-webcam.c | |||
@@ -664,7 +664,7 @@ static void stk_free_buffers(struct stk_camera *dev) | |||
664 | 664 | ||
665 | /* v4l file operations */ | 665 | /* v4l file operations */ |
666 | 666 | ||
667 | static int v4l_stk_open(struct inode *inode, struct file *fp) | 667 | static int v4l_stk_open(struct file *fp) |
668 | { | 668 | { |
669 | struct stk_camera *dev; | 669 | struct stk_camera *dev; |
670 | struct video_device *vdev; | 670 | struct video_device *vdev; |
@@ -684,7 +684,7 @@ static int v4l_stk_open(struct inode *inode, struct file *fp) | |||
684 | return 0; | 684 | return 0; |
685 | } | 685 | } |
686 | 686 | ||
687 | static int v4l_stk_release(struct inode *inode, struct file *fp) | 687 | static int v4l_stk_release(struct file *fp) |
688 | { | 688 | { |
689 | struct stk_camera *dev = fp->private_data; | 689 | struct stk_camera *dev = fp->private_data; |
690 | 690 | ||
@@ -1281,7 +1281,7 @@ static int stk_vidioc_enum_framesizes(struct file *filp, | |||
1281 | } | 1281 | } |
1282 | } | 1282 | } |
1283 | 1283 | ||
1284 | static struct file_operations v4l_stk_fops = { | 1284 | static struct v4l2_file_operations v4l_stk_fops = { |
1285 | .owner = THIS_MODULE, | 1285 | .owner = THIS_MODULE, |
1286 | .open = v4l_stk_open, | 1286 | .open = v4l_stk_open, |
1287 | .release = v4l_stk_release, | 1287 | .release = v4l_stk_release, |
@@ -1289,10 +1289,6 @@ static struct file_operations v4l_stk_fops = { | |||
1289 | .poll = v4l_stk_poll, | 1289 | .poll = v4l_stk_poll, |
1290 | .mmap = v4l_stk_mmap, | 1290 | .mmap = v4l_stk_mmap, |
1291 | .ioctl = video_ioctl2, | 1291 | .ioctl = video_ioctl2, |
1292 | #ifdef CONFIG_COMPAT | ||
1293 | .compat_ioctl = v4l_compat_ioctl32, | ||
1294 | #endif | ||
1295 | .llseek = no_llseek | ||
1296 | }; | 1292 | }; |
1297 | 1293 | ||
1298 | static const struct v4l2_ioctl_ops v4l_stk_ioctl_ops = { | 1294 | static const struct v4l2_ioctl_ops v4l_stk_ioctl_ops = { |
diff --git a/drivers/media/video/stradis.c b/drivers/media/video/stradis.c index bbad54f85c83..10d2608501ae 100644 --- a/drivers/media/video/stradis.c +++ b/drivers/media/video/stradis.c | |||
@@ -1275,7 +1275,7 @@ static void make_clip_tab(struct saa7146 *saa, struct video_clip *cr, int ncr) | |||
1275 | clip_draw_rectangle(clipmap, 0, 0, 1024, -saa->win.y); | 1275 | clip_draw_rectangle(clipmap, 0, 0, 1024, -saa->win.y); |
1276 | } | 1276 | } |
1277 | 1277 | ||
1278 | static int saa_ioctl(struct inode *inode, struct file *file, | 1278 | static int saa_ioctl(struct file *file, |
1279 | unsigned int cmd, unsigned long argl) | 1279 | unsigned int cmd, unsigned long argl) |
1280 | { | 1280 | { |
1281 | struct saa7146 *saa = file->private_data; | 1281 | struct saa7146 *saa = file->private_data; |
@@ -1877,7 +1877,7 @@ static ssize_t saa_write(struct file *file, const char __user * buf, | |||
1877 | return count; | 1877 | return count; |
1878 | } | 1878 | } |
1879 | 1879 | ||
1880 | static int saa_open(struct inode *inode, struct file *file) | 1880 | static int saa_open(struct file *file) |
1881 | { | 1881 | { |
1882 | struct video_device *vdev = video_devdata(file); | 1882 | struct video_device *vdev = video_devdata(file); |
1883 | struct saa7146 *saa = container_of(vdev, struct saa7146, video_dev); | 1883 | struct saa7146 *saa = container_of(vdev, struct saa7146, video_dev); |
@@ -1895,7 +1895,7 @@ static int saa_open(struct inode *inode, struct file *file) | |||
1895 | return 0; | 1895 | return 0; |
1896 | } | 1896 | } |
1897 | 1897 | ||
1898 | static int saa_release(struct inode *inode, struct file *file) | 1898 | static int saa_release(struct file *file) |
1899 | { | 1899 | { |
1900 | struct saa7146 *saa = file->private_data; | 1900 | struct saa7146 *saa = file->private_data; |
1901 | saa->user--; | 1901 | saa->user--; |
@@ -1906,16 +1906,12 @@ static int saa_release(struct inode *inode, struct file *file) | |||
1906 | return 0; | 1906 | return 0; |
1907 | } | 1907 | } |
1908 | 1908 | ||
1909 | static const struct file_operations saa_fops = { | 1909 | static const struct v4l2_file_operations saa_fops = { |
1910 | .owner = THIS_MODULE, | 1910 | .owner = THIS_MODULE, |
1911 | .open = saa_open, | 1911 | .open = saa_open, |
1912 | .release = saa_release, | 1912 | .release = saa_release, |
1913 | .ioctl = saa_ioctl, | 1913 | .ioctl = saa_ioctl, |
1914 | #ifdef CONFIG_COMPAT | ||
1915 | .compat_ioctl = v4l_compat_ioctl32, | ||
1916 | #endif | ||
1917 | .read = saa_read, | 1914 | .read = saa_read, |
1918 | .llseek = no_llseek, | ||
1919 | .write = saa_write, | 1915 | .write = saa_write, |
1920 | .mmap = saa_mmap, | 1916 | .mmap = saa_mmap, |
1921 | }; | 1917 | }; |
diff --git a/drivers/media/video/stv680.c b/drivers/media/video/stv680.c index 42acc92c182d..0783b0a23f8a 100644 --- a/drivers/media/video/stv680.c +++ b/drivers/media/video/stv680.c | |||
@@ -1080,7 +1080,7 @@ static int stv680_newframe (struct usb_stv *stv680, int framenr) | |||
1080 | * Video4Linux | 1080 | * Video4Linux |
1081 | *********************************************************************/ | 1081 | *********************************************************************/ |
1082 | 1082 | ||
1083 | static int stv_open (struct inode *inode, struct file *file) | 1083 | static int stv_open(struct file *file) |
1084 | { | 1084 | { |
1085 | struct video_device *dev = video_devdata(file); | 1085 | struct video_device *dev = video_devdata(file); |
1086 | struct usb_stv *stv680 = video_get_drvdata(dev); | 1086 | struct usb_stv *stv680 = video_get_drvdata(dev); |
@@ -1106,7 +1106,7 @@ static int stv_open (struct inode *inode, struct file *file) | |||
1106 | return err; | 1106 | return err; |
1107 | } | 1107 | } |
1108 | 1108 | ||
1109 | static int stv_close (struct inode *inode, struct file *file) | 1109 | static int stv_close(struct file *file) |
1110 | { | 1110 | { |
1111 | struct video_device *dev = file->private_data; | 1111 | struct video_device *dev = file->private_data; |
1112 | struct usb_stv *stv680 = video_get_drvdata(dev); | 1112 | struct usb_stv *stv680 = video_get_drvdata(dev); |
@@ -1299,7 +1299,7 @@ static int stv680_do_ioctl(struct file *file, unsigned int cmd, void *arg) | |||
1299 | return 0; | 1299 | return 0; |
1300 | } | 1300 | } |
1301 | 1301 | ||
1302 | static int stv680_ioctl(struct inode *inode, struct file *file, | 1302 | static int stv680_ioctl(struct file *file, |
1303 | unsigned int cmd, unsigned long arg) | 1303 | unsigned int cmd, unsigned long arg) |
1304 | { | 1304 | { |
1305 | return video_usercopy(file, cmd, arg, stv680_do_ioctl); | 1305 | return video_usercopy(file, cmd, arg, stv680_do_ioctl); |
@@ -1391,17 +1391,13 @@ static ssize_t stv680_read (struct file *file, char __user *buf, | |||
1391 | return realcount; | 1391 | return realcount; |
1392 | } /* stv680_read */ | 1392 | } /* stv680_read */ |
1393 | 1393 | ||
1394 | static const struct file_operations stv680_fops = { | 1394 | static const struct v4l2_file_operations stv680_fops = { |
1395 | .owner = THIS_MODULE, | 1395 | .owner = THIS_MODULE, |
1396 | .open = stv_open, | 1396 | .open = stv_open, |
1397 | .release = stv_close, | 1397 | .release = stv_close, |
1398 | .read = stv680_read, | 1398 | .read = stv680_read, |
1399 | .mmap = stv680_mmap, | 1399 | .mmap = stv680_mmap, |
1400 | .ioctl = stv680_ioctl, | 1400 | .ioctl = stv680_ioctl, |
1401 | #ifdef CONFIG_COMPAT | ||
1402 | .compat_ioctl = v4l_compat_ioctl32, | ||
1403 | #endif | ||
1404 | .llseek = no_llseek, | ||
1405 | }; | 1401 | }; |
1406 | static struct video_device stv680_template = { | 1402 | static struct video_device stv680_template = { |
1407 | .name = "STV0680 USB camera", | 1403 | .name = "STV0680 USB camera", |
diff --git a/drivers/media/video/usbvideo/usbvideo.c b/drivers/media/video/usbvideo/usbvideo.c index 148a1f98c70f..9bf82430eb18 100644 --- a/drivers/media/video/usbvideo/usbvideo.c +++ b/drivers/media/video/usbvideo/usbvideo.c | |||
@@ -41,13 +41,13 @@ module_param(video_nr, int, 0); | |||
41 | static void usbvideo_Disconnect(struct usb_interface *intf); | 41 | static void usbvideo_Disconnect(struct usb_interface *intf); |
42 | static void usbvideo_CameraRelease(struct uvd *uvd); | 42 | static void usbvideo_CameraRelease(struct uvd *uvd); |
43 | 43 | ||
44 | static int usbvideo_v4l_ioctl(struct inode *inode, struct file *file, | 44 | static int usbvideo_v4l_ioctl(struct file *file, |
45 | unsigned int cmd, unsigned long arg); | 45 | unsigned int cmd, unsigned long arg); |
46 | static int usbvideo_v4l_mmap(struct file *file, struct vm_area_struct *vma); | 46 | static int usbvideo_v4l_mmap(struct file *file, struct vm_area_struct *vma); |
47 | static int usbvideo_v4l_open(struct inode *inode, struct file *file); | 47 | static int usbvideo_v4l_open(struct file *file); |
48 | static ssize_t usbvideo_v4l_read(struct file *file, char __user *buf, | 48 | static ssize_t usbvideo_v4l_read(struct file *file, char __user *buf, |
49 | size_t count, loff_t *ppos); | 49 | size_t count, loff_t *ppos); |
50 | static int usbvideo_v4l_close(struct inode *inode, struct file *file); | 50 | static int usbvideo_v4l_close(struct file *file); |
51 | 51 | ||
52 | static int usbvideo_StartDataPump(struct uvd *uvd); | 52 | static int usbvideo_StartDataPump(struct uvd *uvd); |
53 | static void usbvideo_StopDataPump(struct uvd *uvd); | 53 | static void usbvideo_StopDataPump(struct uvd *uvd); |
@@ -942,17 +942,13 @@ static int usbvideo_find_struct(struct usbvideo *cams) | |||
942 | return rv; | 942 | return rv; |
943 | } | 943 | } |
944 | 944 | ||
945 | static const struct file_operations usbvideo_fops = { | 945 | static const struct v4l2_file_operations usbvideo_fops = { |
946 | .owner = THIS_MODULE, | 946 | .owner = THIS_MODULE, |
947 | .open = usbvideo_v4l_open, | 947 | .open = usbvideo_v4l_open, |
948 | .release =usbvideo_v4l_close, | 948 | .release =usbvideo_v4l_close, |
949 | .read = usbvideo_v4l_read, | 949 | .read = usbvideo_v4l_read, |
950 | .mmap = usbvideo_v4l_mmap, | 950 | .mmap = usbvideo_v4l_mmap, |
951 | .ioctl = usbvideo_v4l_ioctl, | 951 | .ioctl = usbvideo_v4l_ioctl, |
952 | #ifdef CONFIG_COMPAT | ||
953 | .compat_ioctl = v4l_compat_ioctl32, | ||
954 | #endif | ||
955 | .llseek = no_llseek, | ||
956 | }; | 952 | }; |
957 | static const struct video_device usbvideo_template = { | 953 | static const struct video_device usbvideo_template = { |
958 | .fops = &usbvideo_fops, | 954 | .fops = &usbvideo_fops, |
@@ -1113,7 +1109,7 @@ static int usbvideo_v4l_mmap(struct file *file, struct vm_area_struct *vma) | |||
1113 | * 27-Jan-2000 Used USBVIDEO_NUMSBUF as number of URB buffers. | 1109 | * 27-Jan-2000 Used USBVIDEO_NUMSBUF as number of URB buffers. |
1114 | * 24-May-2000 Corrected to prevent race condition (MOD_xxx_USE_COUNT). | 1110 | * 24-May-2000 Corrected to prevent race condition (MOD_xxx_USE_COUNT). |
1115 | */ | 1111 | */ |
1116 | static int usbvideo_v4l_open(struct inode *inode, struct file *file) | 1112 | static int usbvideo_v4l_open(struct file *file) |
1117 | { | 1113 | { |
1118 | struct video_device *dev = video_devdata(file); | 1114 | struct video_device *dev = video_devdata(file); |
1119 | struct uvd *uvd = (struct uvd *) dev; | 1115 | struct uvd *uvd = (struct uvd *) dev; |
@@ -1233,7 +1229,7 @@ static int usbvideo_v4l_open(struct inode *inode, struct file *file) | |||
1233 | * 27-Jan-2000 Used USBVIDEO_NUMSBUF as number of URB buffers. | 1229 | * 27-Jan-2000 Used USBVIDEO_NUMSBUF as number of URB buffers. |
1234 | * 24-May-2000 Moved MOD_DEC_USE_COUNT outside of code that can sleep. | 1230 | * 24-May-2000 Moved MOD_DEC_USE_COUNT outside of code that can sleep. |
1235 | */ | 1231 | */ |
1236 | static int usbvideo_v4l_close(struct inode *inode, struct file *file) | 1232 | static int usbvideo_v4l_close(struct file *file) |
1237 | { | 1233 | { |
1238 | struct video_device *dev = file->private_data; | 1234 | struct video_device *dev = file->private_data; |
1239 | struct uvd *uvd = (struct uvd *) dev; | 1235 | struct uvd *uvd = (struct uvd *) dev; |
@@ -1501,7 +1497,7 @@ static int usbvideo_v4l_do_ioctl(struct file *file, unsigned int cmd, void *arg) | |||
1501 | return 0; | 1497 | return 0; |
1502 | } | 1498 | } |
1503 | 1499 | ||
1504 | static int usbvideo_v4l_ioctl(struct inode *inode, struct file *file, | 1500 | static int usbvideo_v4l_ioctl(struct file *file, |
1505 | unsigned int cmd, unsigned long arg) | 1501 | unsigned int cmd, unsigned long arg) |
1506 | { | 1502 | { |
1507 | return video_usercopy(file, cmd, arg, usbvideo_v4l_do_ioctl); | 1503 | return video_usercopy(file, cmd, arg, usbvideo_v4l_do_ioctl); |
diff --git a/drivers/media/video/usbvideo/vicam.c b/drivers/media/video/usbvideo/vicam.c index 4602597ed8d1..53197a4e6b92 100644 --- a/drivers/media/video/usbvideo/vicam.c +++ b/drivers/media/video/usbvideo/vicam.c | |||
@@ -230,7 +230,7 @@ set_camera_power(struct vicam_camera *cam, int state) | |||
230 | } | 230 | } |
231 | 231 | ||
232 | static int | 232 | static int |
233 | vicam_ioctl(struct inode *inode, struct file *file, unsigned int ioctlnr, unsigned long arg) | 233 | vicam_ioctl(struct file *file, unsigned int ioctlnr, unsigned long arg) |
234 | { | 234 | { |
235 | void __user *user_arg = (void __user *)arg; | 235 | void __user *user_arg = (void __user *)arg; |
236 | struct vicam_camera *cam = file->private_data; | 236 | struct vicam_camera *cam = file->private_data; |
@@ -470,7 +470,7 @@ vicam_ioctl(struct inode *inode, struct file *file, unsigned int ioctlnr, unsign | |||
470 | } | 470 | } |
471 | 471 | ||
472 | static int | 472 | static int |
473 | vicam_open(struct inode *inode, struct file *file) | 473 | vicam_open(struct file *file) |
474 | { | 474 | { |
475 | struct vicam_camera *cam = video_drvdata(file); | 475 | struct vicam_camera *cam = video_drvdata(file); |
476 | 476 | ||
@@ -536,7 +536,7 @@ vicam_open(struct inode *inode, struct file *file) | |||
536 | } | 536 | } |
537 | 537 | ||
538 | static int | 538 | static int |
539 | vicam_close(struct inode *inode, struct file *file) | 539 | vicam_close(struct file *file) |
540 | { | 540 | { |
541 | struct vicam_camera *cam = file->private_data; | 541 | struct vicam_camera *cam = file->private_data; |
542 | int open_count; | 542 | int open_count; |
@@ -783,17 +783,13 @@ vicam_mmap(struct file *file, struct vm_area_struct *vma) | |||
783 | return 0; | 783 | return 0; |
784 | } | 784 | } |
785 | 785 | ||
786 | static const struct file_operations vicam_fops = { | 786 | static const struct v4l2_file_operations vicam_fops = { |
787 | .owner = THIS_MODULE, | 787 | .owner = THIS_MODULE, |
788 | .open = vicam_open, | 788 | .open = vicam_open, |
789 | .release = vicam_close, | 789 | .release = vicam_close, |
790 | .read = vicam_read, | 790 | .read = vicam_read, |
791 | .mmap = vicam_mmap, | 791 | .mmap = vicam_mmap, |
792 | .ioctl = vicam_ioctl, | 792 | .ioctl = vicam_ioctl, |
793 | #ifdef CONFIG_COMPAT | ||
794 | .compat_ioctl = v4l_compat_ioctl32, | ||
795 | #endif | ||
796 | .llseek = no_llseek, | ||
797 | }; | 793 | }; |
798 | 794 | ||
799 | static struct video_device vicam_template = { | 795 | static struct video_device vicam_template = { |
diff --git a/drivers/media/video/usbvision/usbvision-video.c b/drivers/media/video/usbvision/usbvision-video.c index 85661b1848fe..21456b862127 100644 --- a/drivers/media/video/usbvision/usbvision-video.c +++ b/drivers/media/video/usbvision/usbvision-video.c | |||
@@ -355,7 +355,7 @@ static void usbvision_remove_sysfs(struct video_device *vdev) | |||
355 | * then allocates buffers needed for video processing. | 355 | * then allocates buffers needed for video processing. |
356 | * | 356 | * |
357 | */ | 357 | */ |
358 | static int usbvision_v4l2_open(struct inode *inode, struct file *file) | 358 | static int usbvision_v4l2_open(struct file *file) |
359 | { | 359 | { |
360 | struct usb_usbvision *usbvision = video_drvdata(file); | 360 | struct usb_usbvision *usbvision = video_drvdata(file); |
361 | int errCode = 0; | 361 | int errCode = 0; |
@@ -432,7 +432,7 @@ static int usbvision_v4l2_open(struct inode *inode, struct file *file) | |||
432 | * allocated in usbvision_v4l2_open(). | 432 | * allocated in usbvision_v4l2_open(). |
433 | * | 433 | * |
434 | */ | 434 | */ |
435 | static int usbvision_v4l2_close(struct inode *inode, struct file *file) | 435 | static int usbvision_v4l2_close(struct file *file) |
436 | { | 436 | { |
437 | struct usb_usbvision *usbvision = video_drvdata(file); | 437 | struct usb_usbvision *usbvision = video_drvdata(file); |
438 | 438 | ||
@@ -1178,7 +1178,7 @@ static int usbvision_v4l2_mmap(struct file *file, struct vm_area_struct *vma) | |||
1178 | * Here comes the stuff for radio on usbvision based devices | 1178 | * Here comes the stuff for radio on usbvision based devices |
1179 | * | 1179 | * |
1180 | */ | 1180 | */ |
1181 | static int usbvision_radio_open(struct inode *inode, struct file *file) | 1181 | static int usbvision_radio_open(struct file *file) |
1182 | { | 1182 | { |
1183 | struct usb_usbvision *usbvision = video_drvdata(file); | 1183 | struct usb_usbvision *usbvision = video_drvdata(file); |
1184 | int errCode = 0; | 1184 | int errCode = 0; |
@@ -1228,7 +1228,7 @@ out: | |||
1228 | } | 1228 | } |
1229 | 1229 | ||
1230 | 1230 | ||
1231 | static int usbvision_radio_close(struct inode *inode, struct file *file) | 1231 | static int usbvision_radio_close(struct file *file) |
1232 | { | 1232 | { |
1233 | struct usb_usbvision *usbvision = video_drvdata(file); | 1233 | struct usb_usbvision *usbvision = video_drvdata(file); |
1234 | int errCode = 0; | 1234 | int errCode = 0; |
@@ -1266,13 +1266,13 @@ static int usbvision_radio_close(struct inode *inode, struct file *file) | |||
1266 | * Here comes the stuff for vbi on usbvision based devices | 1266 | * Here comes the stuff for vbi on usbvision based devices |
1267 | * | 1267 | * |
1268 | */ | 1268 | */ |
1269 | static int usbvision_vbi_open(struct inode *inode, struct file *file) | 1269 | static int usbvision_vbi_open(struct file *file) |
1270 | { | 1270 | { |
1271 | /* TODO */ | 1271 | /* TODO */ |
1272 | return -ENODEV; | 1272 | return -ENODEV; |
1273 | } | 1273 | } |
1274 | 1274 | ||
1275 | static int usbvision_vbi_close(struct inode *inode, struct file *file) | 1275 | static int usbvision_vbi_close(struct file *file) |
1276 | { | 1276 | { |
1277 | /* TODO */ | 1277 | /* TODO */ |
1278 | return -ENODEV; | 1278 | return -ENODEV; |
@@ -1285,7 +1285,7 @@ static int usbvision_do_vbi_ioctl(struct file *file, | |||
1285 | return -ENOIOCTLCMD; | 1285 | return -ENOIOCTLCMD; |
1286 | } | 1286 | } |
1287 | 1287 | ||
1288 | static int usbvision_vbi_ioctl(struct inode *inode, struct file *file, | 1288 | static int usbvision_vbi_ioctl(struct file *file, |
1289 | unsigned int cmd, unsigned long arg) | 1289 | unsigned int cmd, unsigned long arg) |
1290 | { | 1290 | { |
1291 | return video_usercopy(file, cmd, arg, usbvision_do_vbi_ioctl); | 1291 | return video_usercopy(file, cmd, arg, usbvision_do_vbi_ioctl); |
@@ -1297,16 +1297,14 @@ static int usbvision_vbi_ioctl(struct inode *inode, struct file *file, | |||
1297 | // | 1297 | // |
1298 | 1298 | ||
1299 | // Video template | 1299 | // Video template |
1300 | static const struct file_operations usbvision_fops = { | 1300 | static const struct v4l2_file_operations usbvision_fops = { |
1301 | .owner = THIS_MODULE, | 1301 | .owner = THIS_MODULE, |
1302 | .open = usbvision_v4l2_open, | 1302 | .open = usbvision_v4l2_open, |
1303 | .release = usbvision_v4l2_close, | 1303 | .release = usbvision_v4l2_close, |
1304 | .read = usbvision_v4l2_read, | 1304 | .read = usbvision_v4l2_read, |
1305 | .mmap = usbvision_v4l2_mmap, | 1305 | .mmap = usbvision_v4l2_mmap, |
1306 | .ioctl = video_ioctl2, | 1306 | .ioctl = video_ioctl2, |
1307 | .llseek = no_llseek, | ||
1308 | /* .poll = video_poll, */ | 1307 | /* .poll = video_poll, */ |
1309 | .compat_ioctl = v4l_compat_ioctl32, | ||
1310 | }; | 1308 | }; |
1311 | 1309 | ||
1312 | static const struct v4l2_ioctl_ops usbvision_ioctl_ops = { | 1310 | static const struct v4l2_ioctl_ops usbvision_ioctl_ops = { |
@@ -1355,13 +1353,11 @@ static struct video_device usbvision_video_template = { | |||
1355 | 1353 | ||
1356 | 1354 | ||
1357 | // Radio template | 1355 | // Radio template |
1358 | static const struct file_operations usbvision_radio_fops = { | 1356 | static const struct v4l2_file_operations usbvision_radio_fops = { |
1359 | .owner = THIS_MODULE, | 1357 | .owner = THIS_MODULE, |
1360 | .open = usbvision_radio_open, | 1358 | .open = usbvision_radio_open, |
1361 | .release = usbvision_radio_close, | 1359 | .release = usbvision_radio_close, |
1362 | .ioctl = video_ioctl2, | 1360 | .ioctl = video_ioctl2, |
1363 | .llseek = no_llseek, | ||
1364 | .compat_ioctl = v4l_compat_ioctl32, | ||
1365 | }; | 1361 | }; |
1366 | 1362 | ||
1367 | static const struct v4l2_ioctl_ops usbvision_radio_ioctl_ops = { | 1363 | static const struct v4l2_ioctl_ops usbvision_radio_ioctl_ops = { |
@@ -1392,13 +1388,11 @@ static struct video_device usbvision_radio_template = { | |||
1392 | }; | 1388 | }; |
1393 | 1389 | ||
1394 | // vbi template | 1390 | // vbi template |
1395 | static const struct file_operations usbvision_vbi_fops = { | 1391 | static const struct v4l2_file_operations usbvision_vbi_fops = { |
1396 | .owner = THIS_MODULE, | 1392 | .owner = THIS_MODULE, |
1397 | .open = usbvision_vbi_open, | 1393 | .open = usbvision_vbi_open, |
1398 | .release = usbvision_vbi_close, | 1394 | .release = usbvision_vbi_close, |
1399 | .ioctl = usbvision_vbi_ioctl, | 1395 | .ioctl = usbvision_vbi_ioctl, |
1400 | .llseek = no_llseek, | ||
1401 | .compat_ioctl = v4l_compat_ioctl32, | ||
1402 | }; | 1396 | }; |
1403 | 1397 | ||
1404 | static struct video_device usbvision_vbi_template= | 1398 | static struct video_device usbvision_vbi_template= |
diff --git a/drivers/media/video/uvc/uvc_v4l2.c b/drivers/media/video/uvc/uvc_v4l2.c index afcc6934559e..df9e937626ef 100644 --- a/drivers/media/video/uvc/uvc_v4l2.c +++ b/drivers/media/video/uvc/uvc_v4l2.c | |||
@@ -406,7 +406,7 @@ static int uvc_has_privileges(struct uvc_fh *handle) | |||
406 | * V4L2 file operations | 406 | * V4L2 file operations |
407 | */ | 407 | */ |
408 | 408 | ||
409 | static int uvc_v4l2_open(struct inode *inode, struct file *file) | 409 | static int uvc_v4l2_open(struct file *file) |
410 | { | 410 | { |
411 | struct uvc_video_device *video; | 411 | struct uvc_video_device *video; |
412 | struct uvc_fh *handle; | 412 | struct uvc_fh *handle; |
@@ -444,7 +444,7 @@ done: | |||
444 | return ret; | 444 | return ret; |
445 | } | 445 | } |
446 | 446 | ||
447 | static int uvc_v4l2_release(struct inode *inode, struct file *file) | 447 | static int uvc_v4l2_release(struct file *file) |
448 | { | 448 | { |
449 | struct uvc_video_device *video = video_drvdata(file); | 449 | struct uvc_video_device *video = video_drvdata(file); |
450 | struct uvc_fh *handle = (struct uvc_fh *)file->private_data; | 450 | struct uvc_fh *handle = (struct uvc_fh *)file->private_data; |
@@ -996,7 +996,7 @@ static int uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg) | |||
996 | return ret; | 996 | return ret; |
997 | } | 997 | } |
998 | 998 | ||
999 | static int uvc_v4l2_ioctl(struct inode *inode, struct file *file, | 999 | static int uvc_v4l2_ioctl(struct file *file, |
1000 | unsigned int cmd, unsigned long arg) | 1000 | unsigned int cmd, unsigned long arg) |
1001 | { | 1001 | { |
1002 | if (uvc_trace_param & UVC_TRACE_IOCTL) { | 1002 | if (uvc_trace_param & UVC_TRACE_IOCTL) { |
@@ -1097,13 +1097,11 @@ static unsigned int uvc_v4l2_poll(struct file *file, poll_table *wait) | |||
1097 | return uvc_queue_poll(&video->queue, file, wait); | 1097 | return uvc_queue_poll(&video->queue, file, wait); |
1098 | } | 1098 | } |
1099 | 1099 | ||
1100 | struct file_operations uvc_fops = { | 1100 | const struct v4l2_file_operations uvc_fops = { |
1101 | .owner = THIS_MODULE, | 1101 | .owner = THIS_MODULE, |
1102 | .open = uvc_v4l2_open, | 1102 | .open = uvc_v4l2_open, |
1103 | .release = uvc_v4l2_release, | 1103 | .release = uvc_v4l2_release, |
1104 | .ioctl = uvc_v4l2_ioctl, | 1104 | .ioctl = uvc_v4l2_ioctl, |
1105 | .compat_ioctl = v4l_compat_ioctl32, | ||
1106 | .llseek = no_llseek, | ||
1107 | .read = uvc_v4l2_read, | 1105 | .read = uvc_v4l2_read, |
1108 | .mmap = uvc_v4l2_mmap, | 1106 | .mmap = uvc_v4l2_mmap, |
1109 | .poll = uvc_v4l2_poll, | 1107 | .poll = uvc_v4l2_poll, |
diff --git a/drivers/media/video/uvc/uvcvideo.h b/drivers/media/video/uvc/uvcvideo.h index 896b791ece15..bcf4361dc1bc 100644 --- a/drivers/media/video/uvc/uvcvideo.h +++ b/drivers/media/video/uvc/uvcvideo.h | |||
@@ -753,7 +753,7 @@ static inline int uvc_queue_streaming(struct uvc_video_queue *queue) | |||
753 | } | 753 | } |
754 | 754 | ||
755 | /* V4L2 interface */ | 755 | /* V4L2 interface */ |
756 | extern struct file_operations uvc_fops; | 756 | extern const struct v4l2_file_operations uvc_fops; |
757 | 757 | ||
758 | /* Video */ | 758 | /* Video */ |
759 | extern int uvc_video_init(struct uvc_video_device *video); | 759 | extern int uvc_video_init(struct uvc_video_device *video); |
diff --git a/drivers/media/video/v4l2-compat-ioctl32.c b/drivers/media/video/v4l2-compat-ioctl32.c index 26fdf1e4a2f9..b4f391431853 100644 --- a/drivers/media/video/v4l2-compat-ioctl32.c +++ b/drivers/media/video/v4l2-compat-ioctl32.c | |||
@@ -1072,12 +1072,7 @@ long v4l_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg) | |||
1072 | } | 1072 | } |
1073 | return ret; | 1073 | return ret; |
1074 | } | 1074 | } |
1075 | #else | ||
1076 | long v4l_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg) | ||
1077 | { | ||
1078 | return -ENOIOCTLCMD; | ||
1079 | } | ||
1080 | #endif | ||
1081 | EXPORT_SYMBOL_GPL(v4l_compat_ioctl32); | 1075 | EXPORT_SYMBOL_GPL(v4l_compat_ioctl32); |
1076 | #endif | ||
1082 | 1077 | ||
1083 | MODULE_LICENSE("GPL"); | 1078 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/media/video/v4l2-dev.c b/drivers/media/video/v4l2-dev.c index 7ad6711ee327..000013448b60 100644 --- a/drivers/media/video/v4l2-dev.c +++ b/drivers/media/video/v4l2-dev.c | |||
@@ -31,6 +31,7 @@ | |||
31 | 31 | ||
32 | #include <media/v4l2-common.h> | 32 | #include <media/v4l2-common.h> |
33 | #include <media/v4l2-device.h> | 33 | #include <media/v4l2-device.h> |
34 | #include <media/v4l2-ioctl.h> | ||
34 | 35 | ||
35 | #define VIDEO_NUM_DEVICES 256 | 36 | #define VIDEO_NUM_DEVICES 256 |
36 | #define VIDEO_NAME "video4linux" | 37 | #define VIDEO_NAME "video4linux" |
@@ -182,7 +183,7 @@ static int v4l2_ioctl(struct inode *inode, struct file *filp, | |||
182 | return -ENOTTY; | 183 | return -ENOTTY; |
183 | /* Allow ioctl to continue even if the device was unregistered. | 184 | /* Allow ioctl to continue even if the device was unregistered. |
184 | Things like dequeueing buffers might still be useful. */ | 185 | Things like dequeueing buffers might still be useful. */ |
185 | return vdev->fops->ioctl(inode, filp, cmd, arg); | 186 | return vdev->fops->ioctl(filp, cmd, arg); |
186 | } | 187 | } |
187 | 188 | ||
188 | static long v4l2_unlocked_ioctl(struct file *filp, | 189 | static long v4l2_unlocked_ioctl(struct file *filp, |
@@ -197,20 +198,6 @@ static long v4l2_unlocked_ioctl(struct file *filp, | |||
197 | return vdev->fops->unlocked_ioctl(filp, cmd, arg); | 198 | return vdev->fops->unlocked_ioctl(filp, cmd, arg); |
198 | } | 199 | } |
199 | 200 | ||
200 | #ifdef CONFIG_COMPAT | ||
201 | static long v4l2_compat_ioctl(struct file *filp, | ||
202 | unsigned int cmd, unsigned long arg) | ||
203 | { | ||
204 | struct video_device *vdev = video_devdata(filp); | ||
205 | |||
206 | if (!vdev->fops->compat_ioctl) | ||
207 | return -ENOIOCTLCMD; | ||
208 | /* Allow ioctl to continue even if the device was unregistered. | ||
209 | Things like dequeueing buffers might still be useful. */ | ||
210 | return vdev->fops->compat_ioctl(filp, cmd, arg); | ||
211 | } | ||
212 | #endif | ||
213 | |||
214 | static int v4l2_mmap(struct file *filp, struct vm_area_struct *vm) | 201 | static int v4l2_mmap(struct file *filp, struct vm_area_struct *vm) |
215 | { | 202 | { |
216 | struct video_device *vdev = video_devdata(filp); | 203 | struct video_device *vdev = video_devdata(filp); |
@@ -239,7 +226,7 @@ static int v4l2_open(struct inode *inode, struct file *filp) | |||
239 | /* and increase the device refcount */ | 226 | /* and increase the device refcount */ |
240 | video_get(vdev); | 227 | video_get(vdev); |
241 | mutex_unlock(&videodev_lock); | 228 | mutex_unlock(&videodev_lock); |
242 | ret = vdev->fops->open(inode, filp); | 229 | ret = vdev->fops->open(filp); |
243 | /* decrease the refcount in case of an error */ | 230 | /* decrease the refcount in case of an error */ |
244 | if (ret) | 231 | if (ret) |
245 | video_put(vdev); | 232 | video_put(vdev); |
@@ -250,7 +237,7 @@ static int v4l2_open(struct inode *inode, struct file *filp) | |||
250 | static int v4l2_release(struct inode *inode, struct file *filp) | 237 | static int v4l2_release(struct inode *inode, struct file *filp) |
251 | { | 238 | { |
252 | struct video_device *vdev = video_devdata(filp); | 239 | struct video_device *vdev = video_devdata(filp); |
253 | int ret = vdev->fops->release(inode, filp); | 240 | int ret = vdev->fops->release(filp); |
254 | 241 | ||
255 | /* decrease the refcount unconditionally since the release() | 242 | /* decrease the refcount unconditionally since the release() |
256 | return value is ignored. */ | 243 | return value is ignored. */ |
@@ -266,7 +253,7 @@ static const struct file_operations v4l2_unlocked_fops = { | |||
266 | .mmap = v4l2_mmap, | 253 | .mmap = v4l2_mmap, |
267 | .unlocked_ioctl = v4l2_unlocked_ioctl, | 254 | .unlocked_ioctl = v4l2_unlocked_ioctl, |
268 | #ifdef CONFIG_COMPAT | 255 | #ifdef CONFIG_COMPAT |
269 | .compat_ioctl = v4l2_compat_ioctl, | 256 | .compat_ioctl = v4l_compat_ioctl32, |
270 | #endif | 257 | #endif |
271 | .release = v4l2_release, | 258 | .release = v4l2_release, |
272 | .poll = v4l2_poll, | 259 | .poll = v4l2_poll, |
@@ -281,7 +268,7 @@ static const struct file_operations v4l2_fops = { | |||
281 | .mmap = v4l2_mmap, | 268 | .mmap = v4l2_mmap, |
282 | .ioctl = v4l2_ioctl, | 269 | .ioctl = v4l2_ioctl, |
283 | #ifdef CONFIG_COMPAT | 270 | #ifdef CONFIG_COMPAT |
284 | .compat_ioctl = v4l2_compat_ioctl, | 271 | .compat_ioctl = v4l_compat_ioctl32, |
285 | #endif | 272 | #endif |
286 | .release = v4l2_release, | 273 | .release = v4l2_release, |
287 | .poll = v4l2_poll, | 274 | .poll = v4l2_poll, |
diff --git a/drivers/media/video/v4l2-ioctl.c b/drivers/media/video/v4l2-ioctl.c index b063381f4b3b..3b834f42e97b 100644 --- a/drivers/media/video/v4l2-ioctl.c +++ b/drivers/media/video/v4l2-ioctl.c | |||
@@ -1852,7 +1852,7 @@ static int __video_do_ioctl(struct file *file, | |||
1852 | return ret; | 1852 | return ret; |
1853 | } | 1853 | } |
1854 | 1854 | ||
1855 | long __video_ioctl2(struct file *file, | 1855 | int video_ioctl2(struct file *file, |
1856 | unsigned int cmd, unsigned long arg) | 1856 | unsigned int cmd, unsigned long arg) |
1857 | { | 1857 | { |
1858 | char sbuf[128]; | 1858 | char sbuf[128]; |
@@ -1944,11 +1944,4 @@ out: | |||
1944 | kfree(mbuf); | 1944 | kfree(mbuf); |
1945 | return err; | 1945 | return err; |
1946 | } | 1946 | } |
1947 | EXPORT_SYMBOL(__video_ioctl2); | ||
1948 | |||
1949 | int video_ioctl2(struct inode *inode, struct file *file, | ||
1950 | unsigned int cmd, unsigned long arg) | ||
1951 | { | ||
1952 | return __video_ioctl2(file, cmd, arg); | ||
1953 | } | ||
1954 | EXPORT_SYMBOL(video_ioctl2); | 1947 | EXPORT_SYMBOL(video_ioctl2); |
diff --git a/drivers/media/video/vino.c b/drivers/media/video/vino.c index a72a361daade..63863fa8d65f 100644 --- a/drivers/media/video/vino.c +++ b/drivers/media/video/vino.c | |||
@@ -4019,7 +4019,7 @@ out: | |||
4019 | 4019 | ||
4020 | /* File operations */ | 4020 | /* File operations */ |
4021 | 4021 | ||
4022 | static int vino_open(struct inode *inode, struct file *file) | 4022 | static int vino_open(struct file *file) |
4023 | { | 4023 | { |
4024 | struct vino_channel_settings *vcs = video_drvdata(file); | 4024 | struct vino_channel_settings *vcs = video_drvdata(file); |
4025 | int ret = 0; | 4025 | int ret = 0; |
@@ -4050,7 +4050,7 @@ static int vino_open(struct inode *inode, struct file *file) | |||
4050 | return ret; | 4050 | return ret; |
4051 | } | 4051 | } |
4052 | 4052 | ||
4053 | static int vino_close(struct inode *inode, struct file *file) | 4053 | static int vino_close(struct file *file) |
4054 | { | 4054 | { |
4055 | struct vino_channel_settings *vcs = video_drvdata(file); | 4055 | struct vino_channel_settings *vcs = video_drvdata(file); |
4056 | dprintk("close():\n"); | 4056 | dprintk("close():\n"); |
@@ -4343,7 +4343,7 @@ static int vino_do_ioctl(struct file *file, unsigned int cmd, void *arg) | |||
4343 | return 0; | 4343 | return 0; |
4344 | } | 4344 | } |
4345 | 4345 | ||
4346 | static int vino_ioctl(struct inode *inode, struct file *file, | 4346 | static int vino_ioctl(struct file *file, |
4347 | unsigned int cmd, unsigned long arg) | 4347 | unsigned int cmd, unsigned long arg) |
4348 | { | 4348 | { |
4349 | struct vino_channel_settings *vcs = video_drvdata(file); | 4349 | struct vino_channel_settings *vcs = video_drvdata(file); |
@@ -4364,14 +4364,13 @@ static int vino_ioctl(struct inode *inode, struct file *file, | |||
4364 | /* __initdata */ | 4364 | /* __initdata */ |
4365 | static int vino_init_stage; | 4365 | static int vino_init_stage; |
4366 | 4366 | ||
4367 | static const struct file_operations vino_fops = { | 4367 | static const struct v4l2_file_operations vino_fops = { |
4368 | .owner = THIS_MODULE, | 4368 | .owner = THIS_MODULE, |
4369 | .open = vino_open, | 4369 | .open = vino_open, |
4370 | .release = vino_close, | 4370 | .release = vino_close, |
4371 | .ioctl = vino_ioctl, | 4371 | .ioctl = vino_ioctl, |
4372 | .mmap = vino_mmap, | 4372 | .mmap = vino_mmap, |
4373 | .poll = vino_poll, | 4373 | .poll = vino_poll, |
4374 | .llseek = no_llseek, | ||
4375 | }; | 4374 | }; |
4376 | 4375 | ||
4377 | static struct video_device v4l_device_template = { | 4376 | static struct video_device v4l_device_template = { |
diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c index e15e48f04be7..81d5aa5cf331 100644 --- a/drivers/media/video/vivi.c +++ b/drivers/media/video/vivi.c | |||
@@ -1024,9 +1024,9 @@ static int vidioc_s_ctrl(struct file *file, void *priv, | |||
1024 | File operations for the device | 1024 | File operations for the device |
1025 | ------------------------------------------------------------------*/ | 1025 | ------------------------------------------------------------------*/ |
1026 | 1026 | ||
1027 | static int vivi_open(struct inode *inode, struct file *file) | 1027 | static int vivi_open(struct file *file) |
1028 | { | 1028 | { |
1029 | int minor = iminor(inode); | 1029 | int minor = video_devdata(file)->minor; |
1030 | struct vivi_dev *dev; | 1030 | struct vivi_dev *dev; |
1031 | struct vivi_fh *fh = NULL; | 1031 | struct vivi_fh *fh = NULL; |
1032 | int i; | 1032 | int i; |
@@ -1127,13 +1127,13 @@ vivi_poll(struct file *file, struct poll_table_struct *wait) | |||
1127 | return videobuf_poll_stream(file, q, wait); | 1127 | return videobuf_poll_stream(file, q, wait); |
1128 | } | 1128 | } |
1129 | 1129 | ||
1130 | static int vivi_close(struct inode *inode, struct file *file) | 1130 | static int vivi_close(struct file *file) |
1131 | { | 1131 | { |
1132 | struct vivi_fh *fh = file->private_data; | 1132 | struct vivi_fh *fh = file->private_data; |
1133 | struct vivi_dev *dev = fh->dev; | 1133 | struct vivi_dev *dev = fh->dev; |
1134 | struct vivi_dmaqueue *vidq = &dev->vidq; | 1134 | struct vivi_dmaqueue *vidq = &dev->vidq; |
1135 | 1135 | ||
1136 | int minor = iminor(inode); | 1136 | int minor = video_devdata(file)->minor; |
1137 | 1137 | ||
1138 | vivi_stop_thread(vidq); | 1138 | vivi_stop_thread(vidq); |
1139 | videobuf_stop(&fh->vb_vidq); | 1139 | videobuf_stop(&fh->vb_vidq); |
@@ -1195,16 +1195,14 @@ static int vivi_mmap(struct file *file, struct vm_area_struct *vma) | |||
1195 | return ret; | 1195 | return ret; |
1196 | } | 1196 | } |
1197 | 1197 | ||
1198 | static const struct file_operations vivi_fops = { | 1198 | static const struct v4l2_file_operations vivi_fops = { |
1199 | .owner = THIS_MODULE, | 1199 | .owner = THIS_MODULE, |
1200 | .open = vivi_open, | 1200 | .open = vivi_open, |
1201 | .release = vivi_close, | 1201 | .release = vivi_close, |
1202 | .read = vivi_read, | 1202 | .read = vivi_read, |
1203 | .poll = vivi_poll, | 1203 | .poll = vivi_poll, |
1204 | .ioctl = video_ioctl2, /* V4L2 ioctl handler */ | 1204 | .ioctl = video_ioctl2, /* V4L2 ioctl handler */ |
1205 | .compat_ioctl = v4l_compat_ioctl32, | ||
1206 | .mmap = vivi_mmap, | 1205 | .mmap = vivi_mmap, |
1207 | .llseek = no_llseek, | ||
1208 | }; | 1206 | }; |
1209 | 1207 | ||
1210 | static const struct v4l2_ioctl_ops vivi_ioctl_ops = { | 1208 | static const struct v4l2_ioctl_ops vivi_ioctl_ops = { |
diff --git a/drivers/media/video/w9966.c b/drivers/media/video/w9966.c index 56c570c267ea..91500f57442a 100644 --- a/drivers/media/video/w9966.c +++ b/drivers/media/video/w9966.c | |||
@@ -180,19 +180,19 @@ static int w9966_i2c_wbyte(struct w9966_dev* cam, int data); | |||
180 | static int w9966_i2c_rbyte(struct w9966_dev* cam); | 180 | static int w9966_i2c_rbyte(struct w9966_dev* cam); |
181 | #endif | 181 | #endif |
182 | 182 | ||
183 | static int w9966_v4l_ioctl(struct inode *inode, struct file *file, | 183 | static int w9966_v4l_ioctl(struct file *file, |
184 | unsigned int cmd, unsigned long arg); | 184 | unsigned int cmd, unsigned long arg); |
185 | static ssize_t w9966_v4l_read(struct file *file, char __user *buf, | 185 | static ssize_t w9966_v4l_read(struct file *file, char __user *buf, |
186 | size_t count, loff_t *ppos); | 186 | size_t count, loff_t *ppos); |
187 | 187 | ||
188 | static int w9966_exclusive_open(struct inode *inode, struct file *file) | 188 | static int w9966_exclusive_open(struct file *file) |
189 | { | 189 | { |
190 | struct w9966_dev *cam = video_drvdata(file); | 190 | struct w9966_dev *cam = video_drvdata(file); |
191 | 191 | ||
192 | return test_and_set_bit(0, &cam->in_use) ? -EBUSY : 0; | 192 | return test_and_set_bit(0, &cam->in_use) ? -EBUSY : 0; |
193 | } | 193 | } |
194 | 194 | ||
195 | static int w9966_exclusive_release(struct inode *inode, struct file *file) | 195 | static int w9966_exclusive_release(struct file *file) |
196 | { | 196 | { |
197 | struct w9966_dev *cam = video_drvdata(file); | 197 | struct w9966_dev *cam = video_drvdata(file); |
198 | 198 | ||
@@ -200,16 +200,12 @@ static int w9966_exclusive_release(struct inode *inode, struct file *file) | |||
200 | return 0; | 200 | return 0; |
201 | } | 201 | } |
202 | 202 | ||
203 | static const struct file_operations w9966_fops = { | 203 | static const struct v4l2_file_operations w9966_fops = { |
204 | .owner = THIS_MODULE, | 204 | .owner = THIS_MODULE, |
205 | .open = w9966_exclusive_open, | 205 | .open = w9966_exclusive_open, |
206 | .release = w9966_exclusive_release, | 206 | .release = w9966_exclusive_release, |
207 | .ioctl = w9966_v4l_ioctl, | 207 | .ioctl = w9966_v4l_ioctl, |
208 | #ifdef CONFIG_COMPAT | ||
209 | .compat_ioctl = v4l_compat_ioctl32, | ||
210 | #endif | ||
211 | .read = w9966_v4l_read, | 208 | .read = w9966_v4l_read, |
212 | .llseek = no_llseek, | ||
213 | }; | 209 | }; |
214 | static struct video_device w9966_template = { | 210 | static struct video_device w9966_template = { |
215 | .name = W9966_DRIVERNAME, | 211 | .name = W9966_DRIVERNAME, |
@@ -877,7 +873,7 @@ static int w9966_v4l_do_ioctl(struct file *file, unsigned int cmd, void *arg) | |||
877 | return 0; | 873 | return 0; |
878 | } | 874 | } |
879 | 875 | ||
880 | static int w9966_v4l_ioctl(struct inode *inode, struct file *file, | 876 | static int w9966_v4l_ioctl(struct file *file, |
881 | unsigned int cmd, unsigned long arg) | 877 | unsigned int cmd, unsigned long arg) |
882 | { | 878 | { |
883 | return video_usercopy(file, cmd, arg, w9966_v4l_do_ioctl); | 879 | return video_usercopy(file, cmd, arg, w9966_v4l_do_ioctl); |
diff --git a/drivers/media/video/w9968cf.c b/drivers/media/video/w9968cf.c index 4dfb43bd1846..159b4edd69e0 100644 --- a/drivers/media/video/w9968cf.c +++ b/drivers/media/video/w9968cf.c | |||
@@ -399,13 +399,13 @@ MODULE_PARM_DESC(specific_debug, | |||
399 | ****************************************************************************/ | 399 | ****************************************************************************/ |
400 | 400 | ||
401 | /* Video4linux interface */ | 401 | /* Video4linux interface */ |
402 | static const struct file_operations w9968cf_fops; | 402 | static const struct v4l2_file_operations w9968cf_fops; |
403 | static int w9968cf_open(struct inode*, struct file*); | 403 | static int w9968cf_open(struct file *); |
404 | static int w9968cf_release(struct inode*, struct file*); | 404 | static int w9968cf_release(struct file *); |
405 | static int w9968cf_mmap(struct file*, struct vm_area_struct*); | 405 | static int w9968cf_mmap(struct file *, struct vm_area_struct *); |
406 | static int w9968cf_ioctl(struct inode*, struct file*, unsigned, unsigned long); | 406 | static int w9968cf_ioctl(struct file *, unsigned, unsigned long); |
407 | static ssize_t w9968cf_read(struct file*, char __user *, size_t, loff_t*); | 407 | static ssize_t w9968cf_read(struct file *, char __user *, size_t, loff_t *); |
408 | static int w9968cf_v4l_ioctl(struct inode*, struct file*, unsigned int, | 408 | static int w9968cf_v4l_ioctl(struct file *, unsigned int, |
409 | void __user *); | 409 | void __user *); |
410 | 410 | ||
411 | /* USB-specific */ | 411 | /* USB-specific */ |
@@ -2662,7 +2662,7 @@ static void w9968cf_release_resources(struct w9968cf_device* cam) | |||
2662 | * Video4Linux interface * | 2662 | * Video4Linux interface * |
2663 | ****************************************************************************/ | 2663 | ****************************************************************************/ |
2664 | 2664 | ||
2665 | static int w9968cf_open(struct inode* inode, struct file* filp) | 2665 | static int w9968cf_open(struct file *filp) |
2666 | { | 2666 | { |
2667 | struct w9968cf_device* cam; | 2667 | struct w9968cf_device* cam; |
2668 | int err; | 2668 | int err; |
@@ -2748,7 +2748,7 @@ deallocate_memory: | |||
2748 | } | 2748 | } |
2749 | 2749 | ||
2750 | 2750 | ||
2751 | static int w9968cf_release(struct inode* inode, struct file* filp) | 2751 | static int w9968cf_release(struct file *filp) |
2752 | { | 2752 | { |
2753 | struct w9968cf_device* cam; | 2753 | struct w9968cf_device* cam; |
2754 | 2754 | ||
@@ -2886,7 +2886,7 @@ static int w9968cf_mmap(struct file* filp, struct vm_area_struct *vma) | |||
2886 | 2886 | ||
2887 | 2887 | ||
2888 | static int | 2888 | static int |
2889 | w9968cf_ioctl(struct inode* inode, struct file* filp, | 2889 | w9968cf_ioctl(struct file *filp, |
2890 | unsigned int cmd, unsigned long arg) | 2890 | unsigned int cmd, unsigned long arg) |
2891 | { | 2891 | { |
2892 | struct w9968cf_device* cam; | 2892 | struct w9968cf_device* cam; |
@@ -2909,15 +2909,15 @@ w9968cf_ioctl(struct inode* inode, struct file* filp, | |||
2909 | return -EIO; | 2909 | return -EIO; |
2910 | } | 2910 | } |
2911 | 2911 | ||
2912 | err = w9968cf_v4l_ioctl(inode, filp, cmd, (void __user *)arg); | 2912 | err = w9968cf_v4l_ioctl(filp, cmd, (void __user *)arg); |
2913 | 2913 | ||
2914 | mutex_unlock(&cam->fileop_mutex); | 2914 | mutex_unlock(&cam->fileop_mutex); |
2915 | return err; | 2915 | return err; |
2916 | } | 2916 | } |
2917 | 2917 | ||
2918 | 2918 | ||
2919 | static int w9968cf_v4l_ioctl(struct inode* inode, struct file* filp, | 2919 | static int w9968cf_v4l_ioctl(struct file *filp, |
2920 | unsigned int cmd, void __user * arg) | 2920 | unsigned int cmd, void __user *arg) |
2921 | { | 2921 | { |
2922 | struct w9968cf_device* cam; | 2922 | struct w9968cf_device* cam; |
2923 | const char* v4l1_ioctls[] = { | 2923 | const char* v4l1_ioctls[] = { |
@@ -3456,17 +3456,13 @@ ioctl_fail: | |||
3456 | } | 3456 | } |
3457 | 3457 | ||
3458 | 3458 | ||
3459 | static const struct file_operations w9968cf_fops = { | 3459 | static const struct v4l2_file_operations w9968cf_fops = { |
3460 | .owner = THIS_MODULE, | 3460 | .owner = THIS_MODULE, |
3461 | .open = w9968cf_open, | 3461 | .open = w9968cf_open, |
3462 | .release = w9968cf_release, | 3462 | .release = w9968cf_release, |
3463 | .read = w9968cf_read, | 3463 | .read = w9968cf_read, |
3464 | .ioctl = w9968cf_ioctl, | 3464 | .ioctl = w9968cf_ioctl, |
3465 | #ifdef CONFIG_COMPAT | ||
3466 | .compat_ioctl = v4l_compat_ioctl32, | ||
3467 | #endif | ||
3468 | .mmap = w9968cf_mmap, | 3465 | .mmap = w9968cf_mmap, |
3469 | .llseek = no_llseek, | ||
3470 | }; | 3466 | }; |
3471 | 3467 | ||
3472 | 3468 | ||
diff --git a/drivers/media/video/zc0301/zc0301_core.c b/drivers/media/video/zc0301/zc0301_core.c index 9d00e6056491..46590f63f0eb 100644 --- a/drivers/media/video/zc0301/zc0301_core.c +++ b/drivers/media/video/zc0301/zc0301_core.c | |||
@@ -649,7 +649,7 @@ static void zc0301_release_resources(struct kref *kref) | |||
649 | } | 649 | } |
650 | 650 | ||
651 | 651 | ||
652 | static int zc0301_open(struct inode* inode, struct file* filp) | 652 | static int zc0301_open(struct file *filp) |
653 | { | 653 | { |
654 | struct zc0301_device* cam; | 654 | struct zc0301_device* cam; |
655 | int err = 0; | 655 | int err = 0; |
@@ -733,7 +733,7 @@ out: | |||
733 | } | 733 | } |
734 | 734 | ||
735 | 735 | ||
736 | static int zc0301_release(struct inode* inode, struct file* filp) | 736 | static int zc0301_release(struct file *filp) |
737 | { | 737 | { |
738 | struct zc0301_device* cam; | 738 | struct zc0301_device* cam; |
739 | 739 | ||
@@ -1793,8 +1793,8 @@ zc0301_vidioc_s_parm(struct zc0301_device* cam, void __user * arg) | |||
1793 | } | 1793 | } |
1794 | 1794 | ||
1795 | 1795 | ||
1796 | static int zc0301_ioctl_v4l2(struct inode* inode, struct file* filp, | 1796 | static int zc0301_ioctl_v4l2(struct file *filp, |
1797 | unsigned int cmd, void __user * arg) | 1797 | unsigned int cmd, void __user *arg) |
1798 | { | 1798 | { |
1799 | struct zc0301_device *cam = video_drvdata(filp); | 1799 | struct zc0301_device *cam = video_drvdata(filp); |
1800 | 1800 | ||
@@ -1888,7 +1888,7 @@ static int zc0301_ioctl_v4l2(struct inode* inode, struct file* filp, | |||
1888 | } | 1888 | } |
1889 | 1889 | ||
1890 | 1890 | ||
1891 | static int zc0301_ioctl(struct inode* inode, struct file* filp, | 1891 | static int zc0301_ioctl(struct file *filp, |
1892 | unsigned int cmd, unsigned long arg) | 1892 | unsigned int cmd, unsigned long arg) |
1893 | { | 1893 | { |
1894 | struct zc0301_device *cam = video_drvdata(filp); | 1894 | struct zc0301_device *cam = video_drvdata(filp); |
@@ -1912,7 +1912,7 @@ static int zc0301_ioctl(struct inode* inode, struct file* filp, | |||
1912 | 1912 | ||
1913 | V4LDBG(3, "zc0301", cmd); | 1913 | V4LDBG(3, "zc0301", cmd); |
1914 | 1914 | ||
1915 | err = zc0301_ioctl_v4l2(inode, filp, cmd, (void __user *)arg); | 1915 | err = zc0301_ioctl_v4l2(filp, cmd, (void __user *)arg); |
1916 | 1916 | ||
1917 | mutex_unlock(&cam->fileop_mutex); | 1917 | mutex_unlock(&cam->fileop_mutex); |
1918 | 1918 | ||
@@ -1920,18 +1920,14 @@ static int zc0301_ioctl(struct inode* inode, struct file* filp, | |||
1920 | } | 1920 | } |
1921 | 1921 | ||
1922 | 1922 | ||
1923 | static const struct file_operations zc0301_fops = { | 1923 | static const struct v4l2_file_operations zc0301_fops = { |
1924 | .owner = THIS_MODULE, | 1924 | .owner = THIS_MODULE, |
1925 | .open = zc0301_open, | 1925 | .open = zc0301_open, |
1926 | .release = zc0301_release, | 1926 | .release = zc0301_release, |
1927 | .ioctl = zc0301_ioctl, | 1927 | .ioctl = zc0301_ioctl, |
1928 | #ifdef CONFIG_COMPAT | ||
1929 | .compat_ioctl = v4l_compat_ioctl32, | ||
1930 | #endif | ||
1931 | .read = zc0301_read, | 1928 | .read = zc0301_read, |
1932 | .poll = zc0301_poll, | 1929 | .poll = zc0301_poll, |
1933 | .mmap = zc0301_mmap, | 1930 | .mmap = zc0301_mmap, |
1934 | .llseek = no_llseek, | ||
1935 | }; | 1931 | }; |
1936 | 1932 | ||
1937 | /*****************************************************************************/ | 1933 | /*****************************************************************************/ |
diff --git a/drivers/media/video/zoran/zoran_driver.c b/drivers/media/video/zoran/zoran_driver.c index 00b97d97aeaa..ce4a5e5f9d25 100644 --- a/drivers/media/video/zoran/zoran_driver.c +++ b/drivers/media/video/zoran/zoran_driver.c | |||
@@ -1197,10 +1197,9 @@ zoran_close_end_session (struct file *file) | |||
1197 | */ | 1197 | */ |
1198 | 1198 | ||
1199 | static int | 1199 | static int |
1200 | zoran_open (struct inode *inode, | 1200 | zoran_open(struct file *file) |
1201 | struct file *file) | ||
1202 | { | 1201 | { |
1203 | unsigned int minor = iminor(inode); | 1202 | unsigned int minor = video_devdata(file)->minor; |
1204 | struct zoran *zr = NULL; | 1203 | struct zoran *zr = NULL; |
1205 | struct zoran_fh *fh; | 1204 | struct zoran_fh *fh; |
1206 | int i, res, first_open = 0, have_module_locks = 0; | 1205 | int i, res, first_open = 0, have_module_locks = 0; |
@@ -1340,8 +1339,7 @@ open_unlock_and_return: | |||
1340 | } | 1339 | } |
1341 | 1340 | ||
1342 | static int | 1341 | static int |
1343 | zoran_close (struct inode *inode, | 1342 | zoran_close(struct file *file) |
1344 | struct file *file) | ||
1345 | { | 1343 | { |
1346 | struct zoran_fh *fh = file->private_data; | 1344 | struct zoran_fh *fh = file->private_data; |
1347 | struct zoran *zr = fh->zr; | 1345 | struct zoran *zr = fh->zr; |
@@ -4192,10 +4190,9 @@ static int zoran_do_ioctl(struct file *file, unsigned int cmd, void *arg) | |||
4192 | 4190 | ||
4193 | 4191 | ||
4194 | static int | 4192 | static int |
4195 | zoran_ioctl (struct inode *inode, | 4193 | zoran_ioctl(struct file *file, |
4196 | struct file *file, | 4194 | unsigned int cmd, |
4197 | unsigned int cmd, | 4195 | unsigned long arg) |
4198 | unsigned long arg) | ||
4199 | { | 4196 | { |
4200 | return video_usercopy(file, cmd, arg, zoran_do_ioctl); | 4197 | return video_usercopy(file, cmd, arg, zoran_do_ioctl); |
4201 | } | 4198 | } |
@@ -4620,15 +4617,11 @@ zoran_mmap (struct file *file, | |||
4620 | return 0; | 4617 | return 0; |
4621 | } | 4618 | } |
4622 | 4619 | ||
4623 | static const struct file_operations zoran_fops = { | 4620 | static const struct v4l2_file_operations zoran_fops = { |
4624 | .owner = THIS_MODULE, | 4621 | .owner = THIS_MODULE, |
4625 | .open = zoran_open, | 4622 | .open = zoran_open, |
4626 | .release = zoran_close, | 4623 | .release = zoran_close, |
4627 | .ioctl = zoran_ioctl, | 4624 | .ioctl = zoran_ioctl, |
4628 | #ifdef CONFIG_COMPAT | ||
4629 | .compat_ioctl = v4l_compat_ioctl32, | ||
4630 | #endif | ||
4631 | .llseek = no_llseek, | ||
4632 | .read = zoran_read, | 4625 | .read = zoran_read, |
4633 | .write = zoran_write, | 4626 | .write = zoran_write, |
4634 | .mmap = zoran_mmap, | 4627 | .mmap = zoran_mmap, |
diff --git a/drivers/media/video/zr364xx.c b/drivers/media/video/zr364xx.c index a1d81ed44c7c..bf68ed9c5eb6 100644 --- a/drivers/media/video/zr364xx.c +++ b/drivers/media/video/zr364xx.c | |||
@@ -634,7 +634,7 @@ static int zr364xx_vidioc_streamoff(struct file *file, void *priv, | |||
634 | 634 | ||
635 | 635 | ||
636 | /* open the camera */ | 636 | /* open the camera */ |
637 | static int zr364xx_open(struct inode *inode, struct file *file) | 637 | static int zr364xx_open(struct file *file) |
638 | { | 638 | { |
639 | struct video_device *vdev = video_devdata(file); | 639 | struct video_device *vdev = video_devdata(file); |
640 | struct zr364xx_camera *cam = video_get_drvdata(vdev); | 640 | struct zr364xx_camera *cam = video_get_drvdata(vdev); |
@@ -688,7 +688,7 @@ out: | |||
688 | 688 | ||
689 | 689 | ||
690 | /* release the camera */ | 690 | /* release the camera */ |
691 | static int zr364xx_release(struct inode *inode, struct file *file) | 691 | static int zr364xx_release(struct file *file) |
692 | { | 692 | { |
693 | struct video_device *vdev = video_devdata(file); | 693 | struct video_device *vdev = video_devdata(file); |
694 | struct zr364xx_camera *cam; | 694 | struct zr364xx_camera *cam; |
@@ -761,14 +761,13 @@ static int zr364xx_mmap(struct file *file, struct vm_area_struct *vma) | |||
761 | } | 761 | } |
762 | 762 | ||
763 | 763 | ||
764 | static const struct file_operations zr364xx_fops = { | 764 | static const struct v4l2_file_operations zr364xx_fops = { |
765 | .owner = THIS_MODULE, | 765 | .owner = THIS_MODULE, |
766 | .open = zr364xx_open, | 766 | .open = zr364xx_open, |
767 | .release = zr364xx_release, | 767 | .release = zr364xx_release, |
768 | .read = zr364xx_read, | 768 | .read = zr364xx_read, |
769 | .mmap = zr364xx_mmap, | 769 | .mmap = zr364xx_mmap, |
770 | .ioctl = video_ioctl2, | 770 | .ioctl = video_ioctl2, |
771 | .llseek = no_llseek, | ||
772 | }; | 771 | }; |
773 | 772 | ||
774 | static const struct v4l2_ioctl_ops zr364xx_ioctl_ops = { | 773 | static const struct v4l2_ioctl_ops zr364xx_ioctl_ops = { |
diff --git a/include/media/saa7146_vv.h b/include/media/saa7146_vv.h index 6bbb0d93bb5f..fd7f4fe8c1a0 100644 --- a/include/media/saa7146_vv.h +++ b/include/media/saa7146_vv.h | |||
@@ -179,7 +179,7 @@ struct saa7146_ext_vv | |||
179 | struct saa7146_extension_ioctls *ioctls; | 179 | struct saa7146_extension_ioctls *ioctls; |
180 | int (*ioctl)(struct saa7146_fh*, unsigned int cmd, void *arg); | 180 | int (*ioctl)(struct saa7146_fh*, unsigned int cmd, void *arg); |
181 | 181 | ||
182 | struct file_operations vbi_fops; | 182 | struct v4l2_file_operations vbi_fops; |
183 | }; | 183 | }; |
184 | 184 | ||
185 | struct saa7146_use_ops { | 185 | struct saa7146_use_ops { |
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h index 0a88d1d17d30..4d8ce34551df 100644 --- a/include/media/v4l2-dev.h +++ b/include/media/v4l2-dev.h | |||
@@ -25,6 +25,7 @@ | |||
25 | #define VFL_TYPE_MAX 4 | 25 | #define VFL_TYPE_MAX 4 |
26 | 26 | ||
27 | struct v4l2_ioctl_callbacks; | 27 | struct v4l2_ioctl_callbacks; |
28 | struct video_device; | ||
28 | struct v4l2_device; | 29 | struct v4l2_device; |
29 | 30 | ||
30 | /* Flag to mark the video_device struct as unregistered. | 31 | /* Flag to mark the video_device struct as unregistered. |
@@ -32,6 +33,18 @@ struct v4l2_device; | |||
32 | device access. It is set by video_unregister_device. */ | 33 | device access. It is set by video_unregister_device. */ |
33 | #define V4L2_FL_UNREGISTERED (0) | 34 | #define V4L2_FL_UNREGISTERED (0) |
34 | 35 | ||
36 | struct v4l2_file_operations { | ||
37 | struct module *owner; | ||
38 | ssize_t (*read) (struct file *, char __user *, size_t, loff_t *); | ||
39 | ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); | ||
40 | unsigned int (*poll) (struct file *, struct poll_table_struct *); | ||
41 | int (*ioctl) (struct file *, unsigned int, unsigned long); | ||
42 | long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); | ||
43 | int (*mmap) (struct file *, struct vm_area_struct *); | ||
44 | int (*open) (struct file *); | ||
45 | int (*release) (struct file *); | ||
46 | }; | ||
47 | |||
35 | /* | 48 | /* |
36 | * Newer version of video_device, handled by videodev2.c | 49 | * Newer version of video_device, handled by videodev2.c |
37 | * This version moves redundant code from video device code to | 50 | * This version moves redundant code from video device code to |
@@ -41,7 +54,7 @@ struct v4l2_device; | |||
41 | struct video_device | 54 | struct video_device |
42 | { | 55 | { |
43 | /* device ops */ | 56 | /* device ops */ |
44 | const struct file_operations *fops; | 57 | const struct v4l2_file_operations *fops; |
45 | 58 | ||
46 | /* sysfs */ | 59 | /* sysfs */ |
47 | struct device dev; /* v4l device */ | 60 | struct device dev; /* v4l device */ |
diff --git a/include/media/v4l2-ioctl.h b/include/media/v4l2-ioctl.h index fcdb58c4ce07..835af438e4f8 100644 --- a/include/media/v4l2-ioctl.h +++ b/include/media/v4l2-ioctl.h | |||
@@ -286,27 +286,18 @@ int v4l_compat_translate_ioctl(struct file *file, | |||
286 | #define v4l_compat_translate_ioctl(file, cmd, arg, ioctl) (-EINVAL) | 286 | #define v4l_compat_translate_ioctl(file, cmd, arg, ioctl) (-EINVAL) |
287 | #endif | 287 | #endif |
288 | 288 | ||
289 | #ifdef CONFIG_COMPAT | ||
289 | /* 32 Bits compatibility layer for 64 bits processors */ | 290 | /* 32 Bits compatibility layer for 64 bits processors */ |
290 | extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd, | 291 | extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd, |
291 | unsigned long arg); | 292 | unsigned long arg); |
293 | #endif | ||
292 | 294 | ||
293 | /* Include support for obsoleted stuff */ | 295 | /* Include support for obsoleted stuff */ |
294 | extern int video_usercopy(struct file *file, unsigned int cmd, | 296 | extern int video_usercopy(struct file *file, unsigned int cmd, |
295 | unsigned long arg, v4l2_kioctl func); | 297 | unsigned long arg, v4l2_kioctl func); |
296 | 298 | ||
297 | /* Standard handlers for V4L ioctl's */ | 299 | /* Standard handlers for V4L ioctl's */ |
298 | 300 | extern int video_ioctl2(struct file *file, | |
299 | /* This prototype is used on fops.unlocked_ioctl */ | ||
300 | extern long __video_ioctl2(struct file *file, | ||
301 | unsigned int cmd, unsigned long arg); | ||
302 | |||
303 | /* This prototype is used on fops.ioctl | ||
304 | * Since fops.ioctl enables Kernel Big Lock, it is preferred | ||
305 | * to use __video_ioctl2 instead. | ||
306 | * It should be noticed that there's no lock code inside | ||
307 | * video_ioctl2(). | ||
308 | */ | ||
309 | extern int video_ioctl2(struct inode *inode, struct file *file, | ||
310 | unsigned int cmd, unsigned long arg); | 301 | unsigned int cmd, unsigned long arg); |
311 | 302 | ||
312 | #endif /* _V4L2_IOCTL_H */ | 303 | #endif /* _V4L2_IOCTL_H */ |
diff --git a/include/sound/tea575x-tuner.h b/include/sound/tea575x-tuner.h index b6870cbaf2b3..426899e529c5 100644 --- a/include/sound/tea575x-tuner.h +++ b/include/sound/tea575x-tuner.h | |||
@@ -36,7 +36,7 @@ struct snd_tea575x_ops { | |||
36 | struct snd_tea575x { | 36 | struct snd_tea575x { |
37 | struct snd_card *card; | 37 | struct snd_card *card; |
38 | struct video_device vd; /* video device */ | 38 | struct video_device vd; /* video device */ |
39 | struct file_operations fops; | 39 | struct v4l2_file_operations fops; |
40 | int dev_nr; /* requested device number + 1 */ | 40 | int dev_nr; /* requested device number + 1 */ |
41 | int vd_registered; /* video device is registered */ | 41 | int vd_registered; /* video device is registered */ |
42 | int tea5759; /* 5759 chip is present */ | 42 | int tea5759; /* 5759 chip is present */ |
diff --git a/sound/i2c/other/tea575x-tuner.c b/sound/i2c/other/tea575x-tuner.c index 549b4eba1496..90f416ce97ea 100644 --- a/sound/i2c/other/tea575x-tuner.c +++ b/sound/i2c/other/tea575x-tuner.c | |||
@@ -84,7 +84,7 @@ static void snd_tea575x_set_freq(struct snd_tea575x *tea) | |||
84 | * Linux Video interface | 84 | * Linux Video interface |
85 | */ | 85 | */ |
86 | 86 | ||
87 | static int snd_tea575x_ioctl(struct inode *inode, struct file *file, | 87 | static int snd_tea575x_ioctl(struct file *file, |
88 | unsigned int cmd, unsigned long data) | 88 | unsigned int cmd, unsigned long data) |
89 | { | 89 | { |
90 | struct snd_tea575x *tea = video_drvdata(file); | 90 | struct snd_tea575x *tea = video_drvdata(file); |
@@ -174,14 +174,14 @@ static void snd_tea575x_release(struct video_device *vfd) | |||
174 | { | 174 | { |
175 | } | 175 | } |
176 | 176 | ||
177 | static int snd_tea575x_exclusive_open(struct inode *inode, struct file *file) | 177 | static int snd_tea575x_exclusive_open(struct file *file) |
178 | { | 178 | { |
179 | struct snd_tea575x *tea = video_drvdata(file); | 179 | struct snd_tea575x *tea = video_drvdata(file); |
180 | 180 | ||
181 | return test_and_set_bit(0, &tea->in_use) ? -EBUSY : 0; | 181 | return test_and_set_bit(0, &tea->in_use) ? -EBUSY : 0; |
182 | } | 182 | } |
183 | 183 | ||
184 | static int snd_tea575x_exclusive_release(struct inode *inode, struct file *file) | 184 | static int snd_tea575x_exclusive_release(struct file *file) |
185 | { | 185 | { |
186 | struct snd_tea575x *tea = video_drvdata(file); | 186 | struct snd_tea575x *tea = video_drvdata(file); |
187 | 187 | ||