Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ede2200d79777d461cf2f0fd19cf7a17f633d3a4
Commit:     ede2200d79777d461cf2f0fd19cf7a17f633d3a4
Parent:     8481a7506bc71622bb5bbd89bc89b2f38bff5ead
Author:     Hartmut Hackmann <[EMAIL PROTECTED]>
AuthorDate: Fri Apr 27 12:31:32 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Fri Apr 27 15:44:07 2007 -0300

    V4L/DVB (5369): Fixed 1 byte too short buffer in tda827x.c
    
    - The i2c data buffer in tda827xa_set_params was 1 byte too short
    - saa7134-dvb now gives an error mesage if tda827x could not be attached
    - coding style fix in tda1004x.c
    
    Signed-off-by: Hartmut Hackmann <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/dvb/frontends/tda1004x.c    |    3 ++-
 drivers/media/dvb/frontends/tda827x.c     |    2 +-
 drivers/media/video/saa7134/saa7134-dvb.c |   14 ++++++++++----
 3 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/drivers/media/dvb/frontends/tda1004x.c 
b/drivers/media/dvb/frontends/tda1004x.c
index 3de729b..f488245 100644
--- a/drivers/media/dvb/frontends/tda1004x.c
+++ b/drivers/media/dvb/frontends/tda1004x.c
@@ -695,7 +695,8 @@ static int tda1004x_set_fe(struct dvb_frontend* fe,
        // set frequency
        if (fe->ops.tuner_ops.set_params) {
                fe->ops.tuner_ops.set_params(fe, fe_params);
-               if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
+               if (fe->ops.i2c_gate_ctrl)
+                       fe->ops.i2c_gate_ctrl(fe, 0);
        }
 
        // Hardcoded to use auto as much as possible on the TDA10045 as it
diff --git a/drivers/media/dvb/frontends/tda827x.c 
b/drivers/media/dvb/frontends/tda827x.c
index edf7a0a..8176a9b 100644
--- a/drivers/media/dvb/frontends/tda827x.c
+++ b/drivers/media/dvb/frontends/tda827x.c
@@ -214,7 +214,7 @@ static int tda827xa_set_params(struct dvb_frontend *fe,
                               struct dvb_frontend_parameters *params)
 {
        struct tda827x_priv *priv = fe->tuner_priv;
-       u8 buf[10];
+       u8 buf[11];
 
        struct i2c_msg msg = { .addr = priv->i2c_addr, .flags = 0,
                               .buf = buf, .len = sizeof(buf) };
diff --git a/drivers/media/video/saa7134/saa7134-dvb.c 
b/drivers/media/video/saa7134/saa7134-dvb.c
index 659fd1b..3887f04 100644
--- a/drivers/media/video/saa7134/saa7134-dvb.c
+++ b/drivers/media/video/saa7134/saa7134-dvb.c
@@ -692,8 +692,11 @@ static void configure_tda827x_fe(struct saa7134_dev *dev, 
struct tda1004x_config
        if (dev->dvb.frontend) {
                if (tda_conf->i2c_gate)
                        dev->dvb.frontend->ops.i2c_gate_ctrl = 
tda8290_i2c_gate_ctrl;
-               dvb_attach(tda827x_attach,dev->dvb.frontend,
-                          tda_conf->tuner_address,&dev->i2c_adap,&tda827x_cfg);
+               if (dvb_attach(tda827x_attach, dev->dvb.frontend, 
tda_conf->tuner_address,
+                                               &dev->i2c_adap,&tda827x_cfg) == 
NULL) {
+                       printk ("saa7134/dvb: no tda827x tuner found at addr: 
%02x\n",
+                               tda_conf->tuner_address);
+               }
        }
 }
 
@@ -1038,9 +1041,12 @@ static int dvb_init(struct saa7134_dev *dev)
                                               &ads_tech_duo_config,
                                               &dev->i2c_adap);
                if (dev->dvb.frontend) {
-                       dvb_attach(tda827x_attach,dev->dvb.frontend,
+                       if (dvb_attach(tda827x_attach,dev->dvb.frontend,
                                   ads_tech_duo_config.tuner_address,
-                                  &dev->i2c_adap,&ads_duo_cfg);
+                                  &dev->i2c_adap,&ads_duo_cfg) == NULL) {
+                               printk ("saa7134/dvb: no tda827x tuner found at 
addr: %02x\n",
+                                       ads_tech_duo_config.tuner_address);
+                       }
                }
                break;
        case SAA7134_BOARD_TEVION_DVBT_220RF:
-
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