Commit 3658ea39 authored by Daniel Scheller's avatar Daniel Scheller Committed by Mauro Carvalho Chehab

media: dvb-frontends/stv0367: DDB frontend status inquiry fixup

Return 0 instead of -EINVAL in get_frontend if no demod mode is active.
This fixes ie. dvb-fe-tool getting confused and assuming a DVBv3 FE on idle
frontends when the FE has been put to sleep using sleep().

Also, in read_status(), don't immediately return when no demod is active,
so the remaining code has a chance to clear the signal statistics.
Signed-off-by: default avatarDaniel Scheller <d.scheller@gmx.net>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 979507a7
...@@ -3090,7 +3090,7 @@ static int stv0367ddb_read_status(struct dvb_frontend *fe, ...@@ -3090,7 +3090,7 @@ static int stv0367ddb_read_status(struct dvb_frontend *fe,
{ {
struct stv0367_state *state = fe->demodulator_priv; struct stv0367_state *state = fe->demodulator_priv;
struct dtv_frontend_properties *p = &fe->dtv_property_cache; struct dtv_frontend_properties *p = &fe->dtv_property_cache;
int ret; int ret = 0;
switch (state->activedemod) { switch (state->activedemod) {
case demod_ter: case demod_ter:
...@@ -3100,7 +3100,7 @@ static int stv0367ddb_read_status(struct dvb_frontend *fe, ...@@ -3100,7 +3100,7 @@ static int stv0367ddb_read_status(struct dvb_frontend *fe,
ret = stv0367cab_read_status(fe, status); ret = stv0367cab_read_status(fe, status);
break; break;
default: default:
return 0; break;
} }
/* stop and report on *_read_status failure */ /* stop and report on *_read_status failure */
...@@ -3138,7 +3138,7 @@ static int stv0367ddb_get_frontend(struct dvb_frontend *fe, ...@@ -3138,7 +3138,7 @@ static int stv0367ddb_get_frontend(struct dvb_frontend *fe,
break; break;
} }
return -EINVAL; return 0;
} }
static int stv0367ddb_sleep(struct dvb_frontend *fe) static int stv0367ddb_sleep(struct dvb_frontend *fe)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment