diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2008-10-22 08:56:24 +0200 |
---|---|---|
committer | Jean-Francois Moine <moinejf@free.fr> | 2008-10-22 08:56:24 +0200 |
commit | 3694393e19784ce8396c6ba5d88aff33f46db319 (patch) | |
tree | 9138382fe43cfb711764f9cddbef8ed0c89ae129 /linux/drivers/media/video/cx88/cx88-mpeg.c | |
parent | 2e489f8981067cb48570cf1f5e4e64495afa4985 (diff) | |
parent | 8d0c999d88452b611d2518ad02eae9dbd95e8ce9 (diff) | |
download | mediapointer-dvb-s2-3694393e19784ce8396c6ba5d88aff33f46db319.tar.gz mediapointer-dvb-s2-3694393e19784ce8396c6ba5d88aff33f46db319.tar.bz2 |
merge: v4l-dvb
Diffstat (limited to 'linux/drivers/media/video/cx88/cx88-mpeg.c')
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-mpeg.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-mpeg.c b/linux/drivers/media/video/cx88/cx88-mpeg.c index 88c237790..b21b0c26c 100644 --- a/linux/drivers/media/video/cx88/cx88-mpeg.c +++ b/linux/drivers/media/video/cx88/cx88-mpeg.c @@ -808,8 +808,11 @@ static int __devinit cx8802_probe(struct pci_dev *pci_dev, { struct cx8802_dev *dev; struct cx88_core *core; + int err; +#if defined(CONFIG_VIDEO_CX88_DVB) || defined(CONFIG_VIDEO_CX88_DVB_MODULE) struct videobuf_dvb_frontend *demod; - int err,i; + int i; +#endif /* general setup */ core = cx88_core_get(pci_dev); @@ -822,11 +825,6 @@ static int __devinit cx8802_probe(struct pci_dev *pci_dev, if (!core->board.mpeg) goto fail_core; - if (!core->board.num_frontends) { - printk(KERN_ERR "%s() .num_frontends should be non-zero, err = %d\n", __FUNCTION__, err); - goto fail_core; - } - err = -ENOMEM; dev = kzalloc(sizeof(*dev),GFP_KERNEL); if (NULL == dev) @@ -841,19 +839,22 @@ static int __devinit cx8802_probe(struct pci_dev *pci_dev, INIT_LIST_HEAD(&dev->drvlist); list_add_tail(&dev->devlist,&cx8802_devlist); +#if defined(CONFIG_VIDEO_CX88_DVB) || defined(CONFIG_VIDEO_CX88_DVB_MODULE) mutex_init(&dev->frontends.lock); - INIT_LIST_HEAD(&dev->frontends.frontend.felist); + INIT_LIST_HEAD(&dev->frontends.felist); - printk(KERN_INFO "%s() allocating %d frontend(s)\n", __FUNCTION__, core->board.num_frontends); + if (core->board.num_frontends) + printk(KERN_INFO "%s() allocating %d frontend(s)\n", __func__, core->board.num_frontends); for (i = 1; i <= core->board.num_frontends; i++) { - demod = videobuf_dvb_alloc_frontend(dev, &dev->frontends, i); + demod = videobuf_dvb_alloc_frontend(&dev->frontends, i); if(demod == NULL) { - printk(KERN_ERR "%s() failed to alloc\n", __FUNCTION__); + printk(KERN_ERR "%s() failed to alloc\n", __func__); err = -ENOMEM; goto fail_free; } } +#endif /* Maintain a reference so cx88-video can query the 8802 device. */ core->dvbdev = dev; |