aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/common
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2009-11-27 11:57:55 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-12-15 21:17:58 -0500
commit327ae59757f2e56fd3fc2b11acbd0a7c4070f4e8 (patch)
treee6d1f1b18e49560349194659cfb4b30ff40da9de /drivers/media/common
parent46b21094cee16bc7e531d7d6cd66fb5ea05065d4 (diff)
V4L/DVB (13557): v4l: Remove unneeded video_device::minor usage in drivers
The video_device::minor field is used where it shouldn't, either to - test for error conditions that can't happen anymore with the current v4l-dvb core, - store the value in a driver private field that isn't used anymore, - check the video device type where video_device::vfl_type should be used, or - create the name of a kernel thread that should get a stable name. Remove or fix those use cases. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common')
-rw-r--r--drivers/media/common/saa7146_fops.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/drivers/media/common/saa7146_fops.c b/drivers/media/common/saa7146_fops.c
index 3c11cff00475..7364b9642d00 100644
--- a/drivers/media/common/saa7146_fops.c
+++ b/drivers/media/common/saa7146_fops.c
@@ -1,7 +1,5 @@
1#include <media/saa7146_vv.h> 1#include <media/saa7146_vv.h>
2 2
3#define BOARD_CAN_DO_VBI(dev) (dev->revision != 0 && dev->vv_data->vbi_minor != -1)
4
5/****************************************************************************/ 3/****************************************************************************/
6/* resource management functions, shamelessly stolen from saa7134 driver */ 4/* resource management functions, shamelessly stolen from saa7134 driver */
7 5
@@ -455,9 +453,6 @@ int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv)
455 configuration data) */ 453 configuration data) */
456 dev->ext_vv_data = ext_vv; 454 dev->ext_vv_data = ext_vv;
457 455
458 vv->video_minor = -1;
459 vv->vbi_minor = -1;
460
461 vv->d_clipping.cpu_addr = pci_alloc_consistent(dev->pci, SAA7146_CLIPPING_MEM, &vv->d_clipping.dma_handle); 456 vv->d_clipping.cpu_addr = pci_alloc_consistent(dev->pci, SAA7146_CLIPPING_MEM, &vv->d_clipping.dma_handle);
462 if( NULL == vv->d_clipping.cpu_addr ) { 457 if( NULL == vv->d_clipping.cpu_addr ) {
463 ERR(("out of memory. aborting.\n")); 458 ERR(("out of memory. aborting.\n"));
@@ -496,7 +491,6 @@ EXPORT_SYMBOL_GPL(saa7146_vv_release);
496int saa7146_register_device(struct video_device **vid, struct saa7146_dev* dev, 491int saa7146_register_device(struct video_device **vid, struct saa7146_dev* dev,
497 char *name, int type) 492 char *name, int type)
498{ 493{
499 struct saa7146_vv *vv = dev->vv_data;
500 struct video_device *vfd; 494 struct video_device *vfd;
501 int err; 495 int err;
502 int i; 496 int i;
@@ -524,11 +518,6 @@ int saa7146_register_device(struct video_device **vid, struct saa7146_dev* dev,
524 return err; 518 return err;
525 } 519 }
526 520
527 if (VFL_TYPE_GRABBER == type)
528 vv->video_minor = vfd->minor;
529 else
530 vv->vbi_minor = vfd->minor;
531
532 INFO(("%s: registered device %s [v4l2]\n", 521 INFO(("%s: registered device %s [v4l2]\n",
533 dev->name, video_device_node_name(vfd))); 522 dev->name, video_device_node_name(vfd)));
534 523
@@ -539,16 +528,8 @@ EXPORT_SYMBOL_GPL(saa7146_register_device);
539 528
540int saa7146_unregister_device(struct video_device **vid, struct saa7146_dev* dev) 529int saa7146_unregister_device(struct video_device **vid, struct saa7146_dev* dev)
541{ 530{
542 struct saa7146_vv *vv = dev->vv_data;
543
544 DEB_EE(("dev:%p\n",dev)); 531 DEB_EE(("dev:%p\n",dev));
545 532
546 if ((*vid)->vfl_type == VFL_TYPE_GRABBER) {
547 vv->video_minor = -1;
548 } else {
549 vv->vbi_minor = -1;
550 }
551
552 video_unregister_device(*vid); 533 video_unregister_device(*vid);
553 *vid = NULL; 534 *vid = NULL;
554 535