diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2009-02-28 17:42:59 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 11:43:03 -0400 |
commit | d90958e6d0445fba57b532a3ee0549f0abc58db3 (patch) | |
tree | 9622c78bebf70b34deb0d31c9c2118efd2939cdd | |
parent | b1ff363bfe279c41bd4e43886d47c810459a244e (diff) |
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>
-rw-r--r-- | drivers/media/common/tuners/mxl5007t.c | 8 |
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: | |||
582 | static int mxl5007t_get_status(struct dvb_frontend *fe, u32 *status) | 582 | static int mxl5007t_get_status(struct dvb_frontend *fe, u32 *status) |
583 | { | 583 | { |
584 | struct mxl5007t_state *state = fe->tuner_priv; | 584 | struct mxl5007t_state *state = fe->tuner_priv; |
585 | int rf_locked, ref_locked; | 585 | int rf_locked, ref_locked, ret; |
586 | int ret; | 586 | |
587 | *status = 0; | ||
587 | 588 | ||
588 | if (fe->ops.i2c_gate_ctrl) | 589 | if (fe->ops.i2c_gate_ctrl) |
589 | fe->ops.i2c_gate_ctrl(fe, 1); | 590 | fe->ops.i2c_gate_ctrl(fe, 1); |
@@ -593,6 +594,9 @@ static int mxl5007t_get_status(struct dvb_frontend *fe, u32 *status) | |||
593 | goto fail; | 594 | goto fail; |
594 | mxl_debug("%s%s", rf_locked ? "rf locked " : "", | 595 | mxl_debug("%s%s", rf_locked ? "rf locked " : "", |
595 | ref_locked ? "ref locked" : ""); | 596 | ref_locked ? "ref locked" : ""); |
597 | |||
598 | if ((rf_locked) || (ref_locked)) | ||
599 | *status |= TUNER_STATUS_LOCKED; | ||
596 | fail: | 600 | fail: |
597 | if (fe->ops.i2c_gate_ctrl) | 601 | if (fe->ops.i2c_gate_ctrl) |
598 | fe->ops.i2c_gate_ctrl(fe, 0); | 602 | fe->ops.i2c_gate_ctrl(fe, 0); |