Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dd14523a authored by Abylay Ospan's avatar Abylay Ospan Committed by Mauro Carvalho Chehab
Browse files

[media] lgdt3306a: remove 20*50 msec unnecessary timeout



inside lgdt3306a_search we reading demod status 20 times with 50 msec sleep after each read.
This gives us more than 1 sec of delay. Removing this delay should not affect demod functionality.

Signed-off-by: default avatarAbylay Ospan <aospan@netup.ru>
Acked-by: default avatarMichael Ira Krufky <mkrufky@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 072973ba
Loading
Loading
Loading
Loading
+4 −12
Original line number Diff line number Diff line
@@ -1737,25 +1737,17 @@ static int lgdt3306a_get_tune_settings(struct dvb_frontend *fe,
static int lgdt3306a_search(struct dvb_frontend *fe)
{
	enum fe_status status = 0;
	int i, ret;
	int ret;

	/* set frontend */
	ret = lgdt3306a_set_parameters(fe);
	if (ret)
		goto error;

	/* wait frontend lock */
	for (i = 20; i > 0; i--) {
		dbg_info(": loop=%d\n", i);
		msleep(50);
	ret = lgdt3306a_read_status(fe, &status);
	if (ret)
		goto error;

		if (status & FE_HAS_LOCK)
			break;
	}

	/* check if we have a valid signal */
	if (status & FE_HAS_LOCK)
		return DVBFE_ALGO_SEARCH_SUCCESS;