[media] DVB: dvb_frontend: avoid possible race condition on first event
authorAndreas Oberritter <obi@linuxtv.org>
Thu, 4 Aug 2011 15:33:13 +0000 (12:33 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 3 Sep 2011 11:47:33 +0000 (08:47 -0300)
  enqueued before the frontend thread wakes up.

Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/dvb-core/dvb_frontend.c

index 23d79d0..45ea843 100644 (file)
@@ -1891,8 +1891,8 @@ static int dvb_frontend_ioctl_legacy(struct file *file,
                /* Request the search algorithm to search */
                fepriv->algo_status |= DVBFE_ALGO_SEARCH_AGAIN;
 
-               dvb_frontend_wakeup(fe);
                dvb_frontend_add_event(fe, 0);
+               dvb_frontend_wakeup(fe);
                fepriv->status = 0;
                err = 0;
                break;