summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew de Quincey <adq_dvb@lidskialf.net>2006-07-10 03:34:14 -0300
committerAndrew de Quincey <adq_dvb@lidskialf.net>2006-07-10 03:34:14 -0300
commit740533c62e6b12d108c9597c4547468f223c79e3 (patch)
treec20a203cbdfd47fbf3752fc4d1ab60566822def0
parent789a5a51b4420ee76e4341cf32154c0ddb225d19 (diff)
downloadmediapointer-dvb-s2-740533c62e6b12d108c9597c4547468f223c79e3.tar.gz
mediapointer-dvb-s2-740533c62e6b12d108c9597c4547468f223c79e3.tar.bz2
Fix DISEQC regression
From: Andrew de Quincey <adq_dvb@lidskialf.net> 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>
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_frontend.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
index 0102f5a15..2f992b982 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -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... */
@@ -1019,17 +1021,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;