aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorTrent Piepho <xyzzy@speakeasy.org>2006-12-04 18:04:11 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-12-10 09:22:53 -0200
commit1c5ee876d697a9d1b70117e4277eaa445d14a728 (patch)
tree5926db544f995db037fe36b1264d643f52d95ad9 /drivers
parentV4L/DVB (4941): Remove LINUX_VERSION_CODE and fix identations (diff)
downloadlinux-dev-1c5ee876d697a9d1b70117e4277eaa445d14a728.tar.xz
linux-dev-1c5ee876d697a9d1b70117e4277eaa445d14a728.zip
V4L/DVB (4938): Cx88: Convert lgdt3302 tuning function to use dvb_pll_attach
There was a still a pre-dvb-pll set_params function for the lgdt3302 in the cx88-dvb driver. This patch removes that function and uses dvb_pll_attach() for the cards that were using it (Dvico FusionHDTV 3 GOLD {Q,T}). This way the set_params function from dvb-pll is used. dvb_attach() is in turn used on dvb_pll_attach(), eliminating some static dependencies on dvb-pll. There are still a couple static dependencies on dvb-pll remaining. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers')
-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 0266a3616ce8..95db017baddb 100644
--- a/drivers/media/video/cx88/cx88-dvb.c
+++ b/drivers/media/video/cx88/cx88-dvb.c
@@ -360,38 +360,6 @@ static struct or51132_config pchdtv_hd3000 = {
.set_ts_params = or51132_set_ts_param,
};
-static int lgdt3302_tuner_set_params(struct dvb_frontend* fe,
- struct dvb_frontend_parameters* params)
-{
- /* FIXME make this routine use the tuner-simple code.
- * It could probably be shared with a number of ATSC
- * frontends. Many share the same tuner with analog TV. */
-
- struct cx8802_dev *dev= fe->dvb->priv;
- struct cx88_core *core = dev->core;
- u8 buf[4];
- struct i2c_msg msg =
- { .addr = dev->core->pll_addr, .flags = 0, .buf = buf, .len = 4 };
- int err;
-
- dvb_pll_configure(core->pll_desc, buf, params->frequency, 0);
- dprintk(1, "%s: tuner at 0x%02x bytes: 0x%02x 0x%02x 0x%02x 0x%02x\n",
- __FUNCTION__, msg.addr, buf[0],buf[1],buf[2],buf[3]);
-
- if (fe->ops.i2c_gate_ctrl)
- fe->ops.i2c_gate_ctrl(fe, 1);
- if ((err = i2c_transfer(&core->i2c_adap, &msg, 1)) != 1) {
- printk(KERN_WARNING "cx88-dvb: %s error "
- "(addr %02x <- %02x, err = %i)\n",
- __FUNCTION__, buf[0], buf[1], err);
- if (err < 0)
- return err;
- else
- return -EREMOTEIO;
- }
- return 0;
-}
-
static int lgdt330x_pll_rf_set(struct dvb_frontend* fe, int index)
{
struct cx8802_dev *dev= fe->dvb->priv;
@@ -669,7 +637,8 @@ static int dvb_register(struct cx8802_dev *dev)
&fusionhdtv_3_gold,
&dev->core->i2c_adap);
if (dev->dvb.frontend != NULL) {
- dev->dvb.frontend->ops.tuner_ops.set_params = lgdt3302_tuner_set_params;
+ dvb_attach(dvb_pll_attach, dev->dvb.frontend, dev->core->pll_addr,
+ &dev->core->i2c_adap, dev->core->pll_desc);
}
}
break;
@@ -689,7 +658,8 @@ static int dvb_register(struct cx8802_dev *dev)
&fusionhdtv_3_gold,
&dev->core->i2c_adap);
if (dev->dvb.frontend != NULL) {
- dev->dvb.frontend->ops.tuner_ops.set_params = lgdt3302_tuner_set_params;
+ dvb_attach(dvb_pll_attach, dev->dvb.frontend, dev->core->pll_addr,
+ &dev->core->i2c_adap, dev->core->pll_desc);
}
}
break;