From: Arvo Jarve Date: Mon, 20 Oct 2008 09:05:21 +0000 (-0300) Subject: V4L/DVB (9345): Add event with changed status only X-Git-Tag: MMI-PSA29.97-13-9~30449^2~580 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7bcbdf386bdc2ea2bcd916a7b972ad7bca14db04;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git V4L/DVB (9345): Add event with changed status only Signed-off-by: Arvo Jarve Signed-off-by: Manu Abraham Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c index d006f042f22e..d30e00ff36f1 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c @@ -601,27 +601,33 @@ restart: * requesting a search with a new set of parameters */ if (fepriv->algo_status & DVBFE_ALGO_SEARCH_AGAIN) { - if (fe->ops.search) + if (fe->ops.search) { fepriv->algo_status = fe->ops.search(fe, &fepriv->parameters); /* We did do a search as was requested, the flags are * now unset as well and has the flags wrt to search. */ - - fepriv->algo_status &= ~DVBFE_ALGO_SEARCH_AGAIN; + } else { + fepriv->algo_status &= ~DVBFE_ALGO_SEARCH_AGAIN; + } } /* Track the carrier if the search was successful */ if (fepriv->algo_status == DVBFE_ALGO_SEARCH_SUCCESS) { - if (fepriv->algo_status & DVBFE_ALGO_SEARCH_SUCCESS) - dprintk("%s: status = DVBFE_ALGO_SEARCH_SUCCESS\n", __func__); - if (fepriv->algo_status & DVBFE_ALGO_SEARCH_FAILED) - fepriv->algo_status |= DVBFE_ALGO_SEARCH_AGAIN; - - fe->ops.read_status(fe, &s); - dvb_frontend_add_event(fe, s); /* update event list */ - fepriv->status = s; if (fe->ops.track) fe->ops.track(fe, &fepriv->parameters); - + } else { + fepriv->algo_status |= DVBFE_ALGO_SEARCH_AGAIN; + fepriv->delay = HZ / 2; + } + fe->ops.read_status(fe, &s); + if (s != fepriv->status) { + dvb_frontend_add_event(fe, s); /* update event list */ + fepriv->status = s; + if (!(s & FE_HAS_LOCK)) { + fepriv->delay = HZ / 10; + fepriv->algo_status |= DVBFE_ALGO_SEARCH_AGAIN; + } else { + fepriv->delay = 60 * HZ; + } } break; default: