Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fbfee8684ff235c8cc4e8859913a017dabd59c03
Commit:     fbfee8684ff235c8cc4e8859913a017dabd59c03
Parent:     9bc7c04852194377fc276072359a19b5134250cc
Author:     Michael Krufky <[EMAIL PROTECTED]>
AuthorDate: Wed May 9 15:58:17 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Wed Jul 18 14:23:25 2007 -0300

    V4L/DVB (5651): Dibusb-mb: convert pll handling to properly use dvb-pll
    
    moved tda665x pll_init into dvb_pll_desc dvb_pll_tda665x.initdata
    convert handling of tda665x and tua6010xs to properly use dvb-pll
    
    Signed-off-by: Michael Krufky <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/dvb/dvb-usb/dibusb-mb.c |   21 +++++++++++----------
 drivers/media/dvb/frontends/dvb-pll.c |    1 +
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/drivers/media/dvb/dvb-usb/dibusb-mb.c 
b/drivers/media/dvb/dvb-usb/dibusb-mb.c
index 7a6ae8f..6de4595 100644
--- a/drivers/media/dvb/dvb-usb/dibusb-mb.c
+++ b/drivers/media/dvb/dvb-usb/dibusb-mb.c
@@ -24,9 +24,6 @@ static int dibusb_dib3000mb_frontend_attach(struct 
dvb_usb_adapter *adap)
        if ((adap->fe = 
dib3000mb_attach(&demod_cfg,&adap->dev->i2c_adap,&st->ops)) == NULL)
                return -ENODEV;
 
-       adap->fe->ops.tuner_ops.init       = dvb_usb_tuner_init_i2c;
-       adap->fe->ops.tuner_ops.set_params = dvb_usb_tuner_set_params_i2c;
-
        adap->tuner_pass_ctrl = st->ops.tuner_pass_ctrl;
 
        return 0;
@@ -34,8 +31,15 @@ static int dibusb_dib3000mb_frontend_attach(struct 
dvb_usb_adapter *adap)
 
 static int dibusb_thomson_tuner_attach(struct dvb_usb_adapter *adap)
 {
-       adap->pll_addr = 0x61;
-       adap->pll_desc = &dvb_pll_tua6010xs;
+       dvb_attach(dvb_pll_attach, adap->fe, 0x61, &adap->dev->i2c_adap,
+                  &dvb_pll_tua6010xs);
+       return 0;
+}
+
+static int dibusb_panasonic_tuner_attach(struct dvb_usb_adapter *adap)
+{
+       dvb_attach(dvb_pll_attach, adap->fe, 0x60, &adap->dev->i2c_adap,
+                  &dvb_pll_tda665x);
        return 0;
 }
 
@@ -67,13 +71,10 @@ static int dibusb_tuner_probe_and_attach(struct 
dvb_usb_adapter *adap)
 
        if (b2[0] == 0xfe) {
                info("This device has the Thomson Cable onboard. Which is 
default.");
-               dibusb_thomson_tuner_attach(adap);
+               ret = dibusb_thomson_tuner_attach(adap);
        } else {
-               u8 bpll[4] = { 0x0b, 0xf5, 0x85, 0xab };
                info("This device has the Panasonic ENV77H11D5 onboard.");
-               adap->pll_addr = 0x60;
-               memcpy(adap->pll_init,bpll,4);
-               adap->pll_desc = &dvb_pll_tda665x;
+               ret = dibusb_panasonic_tuner_attach(adap);
        }
 
        return ret;
diff --git a/drivers/media/dvb/frontends/dvb-pll.c 
b/drivers/media/dvb/frontends/dvb-pll.c
index 1363cc8..fc440b1 100644
--- a/drivers/media/dvb/frontends/dvb-pll.c
+++ b/drivers/media/dvb/frontends/dvb-pll.c
@@ -208,6 +208,7 @@ struct dvb_pll_desc dvb_pll_tda665x = {
        .max   = 858000000,
        .set   = tda665x_bw,
        .iffreq= 36166667,
+       .initdata = (u8[]){ 4, 0x0b, 0xf5, 0x85, 0xab },
        .count = 12,
        .entries = {
                {   93834000, 166667, 0xca, 0x61 /* 011 0 0 0  01 */ },
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to