summaryrefslogtreecommitdiff
path: root/linux/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers')
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_frontend.c32
1 files changed, 18 insertions, 14 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
index 737d95edd..bff938203 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -420,7 +420,7 @@ int dvb_frontend_is_exiting (struct dvb_frontend_data *fe)
if (fe->exit)
return 1;
- if (fe->dvbdev->users == 0 && dvb_shutdown_timeout)
+ if (fe->dvbdev->users == 1 && dvb_shutdown_timeout)
if (jiffies - fe->release_jiffies > dvb_shutdown_timeout * HZ)
return 1;
@@ -494,19 +494,6 @@ int dvb_frontend_thread (void *data)
static
-void dvb_frontend_start (struct dvb_frontend_data *fe)
-{
- dprintk ("%s\n", __FUNCTION__);
-
- if (!fe->exit && !fe->thread) {
- if (down_interruptible (&fe->sem))
- return;
- kernel_thread (dvb_frontend_thread, fe, 0);
- }
-}
-
-
-static
void dvb_frontend_stop (struct dvb_frontend_data *fe)
{
dprintk ("%s\n", __FUNCTION__);
@@ -522,6 +509,23 @@ void dvb_frontend_stop (struct dvb_frontend_data *fe)
static
+void dvb_frontend_start (struct dvb_frontend_data *fe)
+{
+ dprintk ("%s\n", __FUNCTION__);
+
+ if (fe->thread)
+ dvb_frontend_stop (fe);
+
+ if (down_interruptible (&fe->sem))
+ return;
+
+ fe->exit = 0;
+
+ kernel_thread (dvb_frontend_thread, fe, 0);
+}
+
+
+static
int dvb_frontend_ioctl (struct inode *inode, struct file *file,
unsigned int cmd, void *parg)
{