The patch number 10505 was added via Mauro Carvalho Chehab <mche...@redhat.com>
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
        Linux Media Mailing List <linux-me...@vger.kernel.org>

------

From: Mauro Carvalho Chehab  <mche...@redhat.com>
tda8290: Print an error if i2c_gate is not provided


While here, be sure that gate will be kept disabled if an error occurs.

Priority: normal

CC: Michael Krufky <mkru...@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mche...@redhat.com>


---

 linux/drivers/media/common/tuners/tda8290.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff -r 8424b48ea1c6 -r aa153b84d997 linux/drivers/media/common/tuners/tda8290.c
--- a/linux/drivers/media/common/tuners/tda8290.c       Sun Feb 08 09:34:43 
2009 -0200
+++ b/linux/drivers/media/common/tuners/tda8290.c       Sun Feb 08 09:42:29 
2009 -0200
@@ -589,8 +589,11 @@ static int tda829x_find_tuner(struct dvb
        u8 data;
        struct i2c_msg msg = { .flags = I2C_M_RD, .buf = &data, .len = 1 };
 
-       if (NULL == analog_ops->i2c_gate_ctrl)
+       if (!analog_ops->i2c_gate_ctrl) {
+               printk(KERN_ERR "tda8290: no gate control were provided!\n");
+
                return -EINVAL;
+       }
 
        analog_ops->i2c_gate_ctrl(fe, 1);
 
@@ -638,6 +641,7 @@ static int tda829x_find_tuner(struct dvb
 
        if (ret != 1) {
                tuner_warn("tuner access failed!\n");
+               analog_ops->i2c_gate_ctrl(fe, 0);
                return -EREMOTEIO;
        }
 


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/aa153b84d997be729628a7db4f11a931b9f10882

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to