summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb-frontends/cxd2841er.c
diff options
context:
space:
mode:
authorDaniel Scheller2017-04-09 21:38:21 +0200
committerMauro Carvalho Chehab2017-06-20 14:55:07 +0200
commite3943aa6d8023bbd0ce972367b8c9eb1b43321e0 (patch)
tree5fd10bd7f34b14bbf111c8d2532fad16fdcfa58f /drivers/media/dvb-frontends/cxd2841er.c
parent[media] dvb-frontends/cxd2841er: optionally tune earlier in set_frontend() (diff)
downloadkernel-qcow2-linux-e3943aa6d8023bbd0ce972367b8c9eb1b43321e0.tar.gz
kernel-qcow2-linux-e3943aa6d8023bbd0ce972367b8c9eb1b43321e0.tar.xz
kernel-qcow2-linux-e3943aa6d8023bbd0ce972367b8c9eb1b43321e0.zip
[media] dvb-frontends/cxd2841er: make lock wait in set_fe_tc() optional
Don't wait for FE_HAS_LOCK in set_frontend_tc() and thus don't hammer the lock status register with inquiries when CXD2841ER_NO_WAIT_LOCK is set in the configuration, which also unneccessarily blocks applications until a TS LOCK has been acquired. Rather, API and applications will check for a TS LOCK by utilising the tune fe_op, read_status and get_frontend ops, which is sufficient. Signed-off-by: Daniel Scheller <d.scheller@gmx.net> Acked-by: Abylay Ospan <aospan@netup.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/dvb-frontends/cxd2841er.c')
-rw-r--r--drivers/media/dvb-frontends/cxd2841er.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/dvb-frontends/cxd2841er.c b/drivers/media/dvb-frontends/cxd2841er.c
index 61f74fea1aa6..0522ceb676c5 100644
--- a/drivers/media/dvb-frontends/cxd2841er.c
+++ b/drivers/media/dvb-frontends/cxd2841er.c
@@ -3460,6 +3460,10 @@ static int cxd2841er_set_frontend_tc(struct dvb_frontend *fe)
cxd2841er_tuner_set(fe);
cxd2841er_tune_done(priv);
+
+ if (priv->flags & CXD2841ER_NO_WAIT_LOCK)
+ goto done;
+
timeout = 2500;
while (timeout > 0) {
ret = cxd2841er_read_status_tc(fe, &status);