summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/media/dvb-frontends/tda1004x.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/media/dvb-frontends/tda1004x.c')
-rw-r--r--kernel/drivers/media/dvb-frontends/tda1004x.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/kernel/drivers/media/dvb-frontends/tda1004x.c b/kernel/drivers/media/dvb-frontends/tda1004x.c
index a2631be7f..c6abeb4fb 100644
--- a/kernel/drivers/media/dvb-frontends/tda1004x.c
+++ b/kernel/drivers/media/dvb-frontends/tda1004x.c
@@ -650,7 +650,7 @@ static int tda10046_init(struct dvb_frontend* fe)
if (tda10046_fwupload(fe)) {
printk("tda1004x: firmware upload failed\n");
- return -EIO;
+ return -EIO;
}
// tda setup
@@ -903,9 +903,18 @@ static int tda1004x_get_fe(struct dvb_frontend *fe)
{
struct dtv_frontend_properties *fe_params = &fe->dtv_property_cache;
struct tda1004x_state* state = fe->demodulator_priv;
+ int status;
dprintk("%s\n", __func__);
+ status = tda1004x_read_byte(state, TDA1004X_STATUS_CD);
+ if (status == -1)
+ return -EIO;
+
+ /* Only update the properties cache if device is locked */
+ if (!(status & 8))
+ return 0;
+
// inversion status
fe_params->inversion = INVERSION_OFF;
if (tda1004x_read_byte(state, TDA1004X_CONFC1) & 0x20)
@@ -1005,7 +1014,8 @@ static int tda1004x_get_fe(struct dvb_frontend *fe)
return 0;
}
-static int tda1004x_read_status(struct dvb_frontend* fe, fe_status_t * fe_status)
+static int tda1004x_read_status(struct dvb_frontend *fe,
+ enum fe_status *fe_status)
{
struct tda1004x_state* state = fe->demodulator_priv;
int status;