diff options
author | Andreas Oberritter <obi@linuxtv.org> | 2011-08-04 11:33:14 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-09-03 07:48:12 -0400 |
commit | 20640bea87c31a823dba3756b1a5248197f0905f (patch) | |
tree | 94ec37c20fb7f99b18a0e4b2e17d97ad5bf536f6 | |
parent | 5c9f480bdb584944b5af390ccdd8c3e586bdafdb (diff) |
[media] DVB: dvb_frontend: clear stale events on FE_SET_FRONTEND
the first event after an attempt to tune.
Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/dvb/dvb-core/dvb_frontend.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c index 45ea843d93d..41023111220 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c | |||
@@ -220,6 +220,16 @@ static int dvb_frontend_get_event(struct dvb_frontend *fe, | |||
220 | return 0; | 220 | return 0; |
221 | } | 221 | } |
222 | 222 | ||
223 | static void dvb_frontend_clear_events(struct dvb_frontend *fe) | ||
224 | { | ||
225 | struct dvb_frontend_private *fepriv = fe->frontend_priv; | ||
226 | struct dvb_fe_events *events = &fepriv->events; | ||
227 | |||
228 | mutex_lock(&events->mtx); | ||
229 | events->eventr = events->eventw; | ||
230 | mutex_unlock(&events->mtx); | ||
231 | } | ||
232 | |||
223 | static void dvb_frontend_init(struct dvb_frontend *fe) | 233 | static void dvb_frontend_init(struct dvb_frontend *fe) |
224 | { | 234 | { |
225 | dprintk ("DVB: initialising adapter %i frontend %i (%s)...\n", | 235 | dprintk ("DVB: initialising adapter %i frontend %i (%s)...\n", |
@@ -1891,6 +1901,7 @@ static int dvb_frontend_ioctl_legacy(struct file *file, | |||
1891 | /* Request the search algorithm to search */ | 1901 | /* Request the search algorithm to search */ |
1892 | fepriv->algo_status |= DVBFE_ALGO_SEARCH_AGAIN; | 1902 | fepriv->algo_status |= DVBFE_ALGO_SEARCH_AGAIN; |
1893 | 1903 | ||
1904 | dvb_frontend_clear_events(fe); | ||
1894 | dvb_frontend_add_event(fe, 0); | 1905 | dvb_frontend_add_event(fe, 0); |
1895 | dvb_frontend_wakeup(fe); | 1906 | dvb_frontend_wakeup(fe); |
1896 | fepriv->status = 0; | 1907 | fepriv->status = 0; |