aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88-mpeg.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-10-21 09:43:10 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-21 12:31:59 -0400
commit3007703db804b7e6e9f5e3cca9e3a661e0ff3eb2 (patch)
tree8bf44c4c64dbd02da721b9d2bf7d10df8b911c76 /drivers/media/video/cx88/cx88-mpeg.c
parent9212a572dd5ecc69f9b9985ba3e92c6f2504f0fc (diff)
V4L/DVB (9333): cx88: Not all boards that requires cx88-mpeg has frontends
The multifrontend changes on cx88 assumed that all boards that use cx88-mpeg supports DVB. This is not true. There also a few analog-only boards based on Blackboard design that also uses cx88-mpeg. For those boards, there's no need to allocate dvb frontends. This patch fixes videobuf allocation for those devices. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx88/cx88-mpeg.c')
-rw-r--r--drivers/media/video/cx88/cx88-mpeg.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/media/video/cx88/cx88-mpeg.c b/drivers/media/video/cx88/cx88-mpeg.c
index b21fd93c1929..a1c435b4b1cd 100644
--- a/drivers/media/video/cx88/cx88-mpeg.c
+++ b/drivers/media/video/cx88/cx88-mpeg.c
@@ -785,11 +785,6 @@ static int __devinit cx8802_probe(struct pci_dev *pci_dev,
785 if (!core->board.mpeg) 785 if (!core->board.mpeg)
786 goto fail_core; 786 goto fail_core;
787 787
788 if (!core->board.num_frontends) {
789 printk(KERN_ERR "%s() .num_frontends should be non-zero, err = %d\n", __func__, err);
790 goto fail_core;
791 }
792
793 err = -ENOMEM; 788 err = -ENOMEM;
794 dev = kzalloc(sizeof(*dev),GFP_KERNEL); 789 dev = kzalloc(sizeof(*dev),GFP_KERNEL);
795 if (NULL == dev) 790 if (NULL == dev)
@@ -808,7 +803,8 @@ static int __devinit cx8802_probe(struct pci_dev *pci_dev,
808 mutex_init(&dev->frontends.lock); 803 mutex_init(&dev->frontends.lock);
809 INIT_LIST_HEAD(&dev->frontends.felist); 804 INIT_LIST_HEAD(&dev->frontends.felist);
810 805
811 printk(KERN_INFO "%s() allocating %d frontend(s)\n", __func__, core->board.num_frontends); 806 if (core->board.num_frontends)
807 printk(KERN_INFO "%s() allocating %d frontend(s)\n", __func__, core->board.num_frontends);
812 808
813 for (i = 1; i <= core->board.num_frontends; i++) { 809 for (i = 1; i <= core->board.num_frontends; i++) {
814 demod = videobuf_dvb_alloc_frontend(&dev->frontends, i); 810 demod = videobuf_dvb_alloc_frontend(&dev->frontends, i);