mirror of
https://github.com/torvalds/linux.git
synced 2024-11-16 00:52:01 +00:00
V4L/DVB (4292): Fix DISEQC regression
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>
This commit is contained in:
parent
061b623c54
commit
04c56d0e5b
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user