summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2009-02-28 17:42:59 -0500
committerMichael Krufky <mkrufky@linuxtv.org>2009-02-28 17:42:59 -0500
commit8115a43de9b2f7435d67a93f1a0ecc56cac9b023 (patch)
treee8820fe108d36dfa39b5d347cfdb942313de072e
parentadfdbfcc476847ad0ea239eb72e52d4a7905563f (diff)
downloadmediapointer-dvb-s2-8115a43de9b2f7435d67a93f1a0ecc56cac9b023.tar.gz
mediapointer-dvb-s2-8115a43de9b2f7435d67a93f1a0ecc56cac9b023.tar.bz2
mxl5007t: mxl5007t_get_status should report if tuner is locked
From: Michael Krufky <mkrufky@linuxtv.org> report TUNER_STATUS_LOCKED if rf_locked or ref_locked Priority: normal Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
-rw-r--r--linux/drivers/media/common/tuners/mxl5007t.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/linux/drivers/media/common/tuners/mxl5007t.c b/linux/drivers/media/common/tuners/mxl5007t.c
index 202b5cb8f..3db661fc1 100644
--- a/linux/drivers/media/common/tuners/mxl5007t.c
+++ b/linux/drivers/media/common/tuners/mxl5007t.c
@@ -587,8 +587,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);
@@ -598,6 +599,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);