diff options
author | Antti Palosaari <crope@iki.fi> | 2012-01-15 16:30:36 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-01-16 09:55:47 -0500 |
commit | 3b6a567afa3250abf280ef535000dc0dc3ed9d52 (patch) | |
tree | 05869bf6676761d97f0d6f698b0695dab0a4ac00 /drivers/media/dvb/frontends | |
parent | 1f64972937d84f48a8b4d16e7e0b4a5ee7904c96 (diff) |
[media] cxd2820r: do not allow get_frontend() when demod is not initialized
This fixes bug introduced by multi-frontend to single-frontend change.
Finally HAS_LOCK is got back!
We are not allowed to access hardware in sleep mode...
Chip did not like when .get_frontend() reads some registers while
chip was sleeping and due to that HAS_LOCK bit was never gained.
TODO: We should add logic for dvb-core to drop out illegal calls like that.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends')
-rw-r--r-- | drivers/media/dvb/frontends/cxd2820r_core.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/media/dvb/frontends/cxd2820r_core.c b/drivers/media/dvb/frontends/cxd2820r_core.c index 372a4e700254..caae7f79c837 100644 --- a/drivers/media/dvb/frontends/cxd2820r_core.c +++ b/drivers/media/dvb/frontends/cxd2820r_core.c | |||
@@ -309,9 +309,14 @@ static int cxd2820r_read_status(struct dvb_frontend *fe, fe_status_t *status) | |||
309 | 309 | ||
310 | static int cxd2820r_get_frontend(struct dvb_frontend *fe) | 310 | static int cxd2820r_get_frontend(struct dvb_frontend *fe) |
311 | { | 311 | { |
312 | struct cxd2820r_priv *priv = fe->demodulator_priv; | ||
312 | int ret; | 313 | int ret; |
313 | 314 | ||
314 | dbg("%s: delsys=%d", __func__, fe->dtv_property_cache.delivery_system); | 315 | dbg("%s: delsys=%d", __func__, fe->dtv_property_cache.delivery_system); |
316 | |||
317 | if (priv->delivery_system == SYS_UNDEFINED) | ||
318 | return 0; | ||
319 | |||
315 | switch (fe->dtv_property_cache.delivery_system) { | 320 | switch (fe->dtv_property_cache.delivery_system) { |
316 | case SYS_DVBT: | 321 | case SYS_DVBT: |
317 | ret = cxd2820r_get_frontend_t(fe); | 322 | ret = cxd2820r_get_frontend_t(fe); |