summaryrefslogtreecommitdiffstats
path: root/drivers/media/common/tuners
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2009-02-28 23:42:59 +0100
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 17:43:03 +0200
commitd90958e6d0445fba57b532a3ee0549f0abc58db3 (patch)
tree9622c78bebf70b34deb0d31c9c2118efd2939cdd /drivers/media/common/tuners
parentV4L/DVB (10780): mxl5007t: remove function mxl5007t_check_rf_input_power (diff)
downloadlinux-d90958e6d0445fba57b532a3ee0549f0abc58db3.tar.xz
linux-d90958e6d0445fba57b532a3ee0549f0abc58db3.zip
V4L/DVB (10781): mxl5007t: mxl5007t_get_status should report if tuner is locked
report TUNER_STATUS_LOCKED if rf_locked or ref_locked Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common/tuners')
-rw-r--r--drivers/media/common/tuners/mxl5007t.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/media/common/tuners/mxl5007t.c b/drivers/media/common/tuners/mxl5007t.c
index e2a2cf2d31fc..abb38326a07f 100644
--- a/drivers/media/common/tuners/mxl5007t.c
+++ b/drivers/media/common/tuners/mxl5007t.c
@@ -582,8 +582,9 @@ fail:
static int mxl5007t_get_status(struct dvb_frontend *fe, u32 *status)
{
struct mxl5007t_state *state = fe->tuner_priv;
- int rf_locked, ref_locked;
- int ret;
+ int rf_locked, ref_locked, ret;
+
+ *status = 0;
if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 1);
@@ -593,6 +594,9 @@ static int mxl5007t_get_status(struct dvb_frontend *fe, u32 *status)
goto fail;
mxl_debug("%s%s", rf_locked ? "rf locked " : "",
ref_locked ? "ref locked" : "");
+
+ if ((rf_locked) || (ref_locked))
+ *status |= TUNER_STATUS_LOCKED;
fail:
if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 0);