]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (4292): Fix DISEQC regression
authorAndrew de Quincey <adq_dvb@lidskialf.net>
Mon, 10 Jul 2006 06:34:14 +0000 (03:34 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Sat, 29 Jul 2006 20:22:09 +0000 (17:22 -0300)
The changes to add frontend reinitialisation moved the position where the
init() op is called into the frontend thread. Unfortunately, since DISEQC
operations do not use the frontend thread, this meant that DISEQC could be
called against an uninitalised frontend, leading to all sorts of trouble.
Patch fixes this by reinstating the original fronted intialisation call.

Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/dvb/dvb-core/dvb_frontend.c

index 59ac35ddd51ef693f388eb3599a133d64cdd585e..57b34cda99f5a6f598b9786d42af22d58a19f70d 100644 (file)
@@ -526,7 +526,9 @@ static int dvb_frontend_thread(void *data)
        fepriv->delay = 3*HZ;
        fepriv->status = 0;
        fepriv->wakeup = 0;
-       fepriv->reinitialise = 1;
+       fepriv->reinitialise = 0;
+
+       dvb_frontend_init(fe);
 
        while (1) {
                up(&fepriv->sem);           /* is locked when we enter the thread... */
@@ -1013,17 +1015,18 @@ static int dvb_frontend_open(struct inode *inode, struct file *file)
                return ret;
 
        if ((file->f_flags & O_ACCMODE) != O_RDONLY) {
+
+               /* normal tune mode when opened R/W */
+               fepriv->tune_mode_flags &= ~FE_TUNE_MODE_ONESHOT;
+               fepriv->tone = -1;
+               fepriv->voltage = -1;
+
                ret = dvb_frontend_start (fe);
                if (ret)
                        dvb_generic_release (inode, file);
 
                /*  empty event queue */
                fepriv->events.eventr = fepriv->events.eventw = 0;
-
-               /* normal tune mode when opened R/W */
-               fepriv->tune_mode_flags &= ~FE_TUNE_MODE_ONESHOT;
-               fepriv->tone = -1;
-               fepriv->voltage = -1;
        }
 
        return ret;