summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88-dvb.c
diff options
context:
space:
mode:
authorDarron Broad <darron@kewl.org>2008-10-11 11:18:53 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-17 17:23:15 -0300
commit92abe9ee374599179033f039b095864a9cf74593 (patch)
tree2e4304cac9052a8848b972e678d372bd49d7db29 /drivers/media/video/cx88/cx88-dvb.c
parent363c35fc448943c3d6121332d28bcda2d2fbf87c (diff)
V4L/DVB (9223): MFE: Fix a number of bugs and some tidying up
A number of reference to videobuf_dvb_get_frontend used an invalid index. This has been fixed. The section for the HVR3000 in advise_acquire was redundant as the same logic is used on the HVR4000. This has been removed and both cards now use the same function. A number of small errors and whitespace errors are also fixed. Signed-off-by: Darron Broad <darron@kewl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx88/cx88-dvb.c')
-rw-r--r--drivers/media/video/cx88/cx88-dvb.c38
1 files changed, 4 insertions, 34 deletions
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c
index 099de66c72c..58128687e5c 100644
--- a/drivers/media/video/cx88/cx88-dvb.c
+++ b/drivers/media/video/cx88/cx88-dvb.c
@@ -124,7 +124,6 @@ static int cx88_dvb_bus_ctrl(struct dvb_frontend* fe, int acquire)
return -EINVAL;
}
-
drv = cx8802_get_driver(dev, CX88_MPEG_DVB);
if (drv) {
if (acquire){
@@ -502,7 +501,7 @@ static int attach_xc3028(u8 addr, struct cx8802_dev *dev)
.ctrl = &ctl,
};
-/* Get the first frontend */
+ /* Get the first frontend */
fe0 = videobuf_dvb_get_frontend(&dev->frontends, 1);
if (!fe0)
return -EINVAL;
@@ -1136,35 +1135,7 @@ static int cx8802_dvb_advise_acquire(struct cx8802_driver *drv)
udelay(1000);
break;
- case CX88_BOARD_HAUPPAUGE_HVR3000: /* ? */
- if(core->dvbdev->frontends.active_fe_id == 1) {
- /* DVB-S/S2 Enabled */
-
- /* Toggle reset on cx22702 leaving i2c active */
- cx_write(MO_GP0_IO, core->board.input[0].gpio0);
- udelay(1000);
- cx_clear(MO_GP0_IO, 0x00000080);
- udelay(50);
- cx_set(MO_GP0_IO, 0x00000080); /* cx22702 out of reset */
- cx_set(MO_GP0_IO, 0x00000004); /* tri-state the cx22702 pins */
- udelay(1000);
-
- cx_write(MO_SRST_IO, 1); /* Take the cx24116/cx24123 out of reset */
- core->dvbdev->ts_gen_cntrl = 0x02; /* Parallel IO */
- } else
- if (core->dvbdev->frontends.active_fe_id == 2) {
- /* DVB-T Enabled */
-
- /* Put the cx24116/cx24123 into reset */
- cx_write(MO_SRST_IO, 0);
-
- /* cx22702 out of reset and enable it */
- cx_set(MO_GP0_IO, 0x00000080);
- cx_clear(MO_GP0_IO, 0x00000004);
- core->dvbdev->ts_gen_cntrl = 0x0c; /* Serial IO */
- udelay(1000);
- }
- break;
+ case CX88_BOARD_HAUPPAUGE_HVR3000:
case CX88_BOARD_HAUPPAUGE_HVR4000:
if(core->dvbdev->frontends.active_fe_id == 1) {
/* DVB-S/S2 Enabled */
@@ -1225,7 +1196,7 @@ static int cx8802_dvb_probe(struct cx8802_driver *drv)
{
struct cx88_core *core = drv->core;
struct cx8802_dev *dev = drv->core->dvbdev;
- int err,i;
+ int err, i;
struct videobuf_dvb_frontend *fe;
dprintk( 1, "%s\n", __func__);
@@ -1267,8 +1238,7 @@ static int cx8802_dvb_probe(struct cx8802_driver *drv)
if (err != 0)
printk(KERN_ERR "%s/2: dvb_register failed (err = %d)\n",
core->name, err);
-
- fail_core:
+fail_core:
return err;
}