提交 035cad57 编写于 作者: J Jemma Denson 提交者: Mauro Carvalho Chehab

[media] cx24120: make sure tuner is locked at get_frontend

Change get_frontend to re-check current lock status rather than relying
on a cached value from get_status. Removes potential for tuning failure
if get_frontend is called during tuning.

Probably not too essential as other changes work around this:
https://patchwork.linuxtv.org/patch/32845/Signed-off-by: NJemma Denson <jdenson@gmail.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
上级 565e37d1
......@@ -1507,11 +1507,13 @@ static int cx24120_get_frontend(struct dvb_frontend *fe,
{
struct cx24120_state *state = fe->demodulator_priv;
u8 freq1, freq2, freq3;
int status;
dev_dbg(&state->i2c->dev, "\n");
/* don't return empty data if we're not tuned in */
if ((state->fe_status & FE_HAS_LOCK) == 0)
status = cx24120_readreg(state, CX24120_REG_STATUS);
if (!(status & CX24120_HAS_LOCK))
return 0;
/* Get frequency */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册