[patch 18/45] v4l/dvb: Backport the DISEQC regression fix to 2.6.17.x

Greg KH
2006-07-17T16:32:09Z

[-- Attachment #1: v4l-dvb-backport-the-diseqc-regression-fix-to-2.6.17.x.patch --]
[-- Type: text/plain, Size: 1554 bytes --]

-stable review patch. If anyone has any objections, please let us know.

------------------
From: Andrew de Quincey <adq_dvb@lidskialf.net>

Backport the DISEQC regression fix to 2.6.17.x

Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---

drivers/media/dvb/dvb-core/dvb_frontend.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)

--- linux-2.6.17.3.orig/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ linux-2.6.17.3/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -519,7 +519,9 @@ static int dvb_frontend_thread(void *dat
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... */
@@ -996,17 +998,17 @@ static int dvb_frontend_open(struct inod
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;

--