diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-02-08 06:42:29 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 11:42:42 -0400 |
commit | 31063814400cd37d47f5f58a96e58596196f04b0 (patch) | |
tree | 7a6d65ef002dd4f8add0a8472244db0b99113175 /drivers/media/common | |
parent | 68d5ce70217ddd20baf3583ce25f08e869eb148f (diff) |
V4L/DVB (10505): tda8290: Print an error if i2c_gate is not provided
While here, be sure that gate will be kept disabled if an error occurs.
Cc: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common')
-rw-r--r-- | drivers/media/common/tuners/tda8290.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/common/tuners/tda8290.c b/drivers/media/common/tuners/tda8290.c index 4b8662edb7cb..39697fa59256 100644 --- a/drivers/media/common/tuners/tda8290.c +++ b/drivers/media/common/tuners/tda8290.c | |||
@@ -566,8 +566,11 @@ static int tda829x_find_tuner(struct dvb_frontend *fe) | |||
566 | u8 data; | 566 | u8 data; |
567 | struct i2c_msg msg = { .flags = I2C_M_RD, .buf = &data, .len = 1 }; | 567 | struct i2c_msg msg = { .flags = I2C_M_RD, .buf = &data, .len = 1 }; |
568 | 568 | ||
569 | if (NULL == analog_ops->i2c_gate_ctrl) | 569 | if (!analog_ops->i2c_gate_ctrl) { |
570 | printk(KERN_ERR "tda8290: no gate control were provided!\n"); | ||
571 | |||
570 | return -EINVAL; | 572 | return -EINVAL; |
573 | } | ||
571 | 574 | ||
572 | analog_ops->i2c_gate_ctrl(fe, 1); | 575 | analog_ops->i2c_gate_ctrl(fe, 1); |
573 | 576 | ||
@@ -615,6 +618,7 @@ static int tda829x_find_tuner(struct dvb_frontend *fe) | |||
615 | 618 | ||
616 | if (ret != 1) { | 619 | if (ret != 1) { |
617 | tuner_warn("tuner access failed!\n"); | 620 | tuner_warn("tuner access failed!\n"); |
621 | analog_ops->i2c_gate_ctrl(fe, 0); | ||
618 | return -EREMOTEIO; | 622 | return -EREMOTEIO; |
619 | } | 623 | } |
620 | 624 | ||