Skip to content

Commit

Permalink
V4L/DVB (4292): Fix DISEQC regression
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrew de Quincey authored and Mauro Carvalho Chehab committed Jul 29, 2006
1 parent 061b623 commit 04c56d0
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions drivers/media/dvb/dvb-core/dvb_frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -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... */
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 04c56d0

Please sign in to comment.