summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorHolger Waechtler <devnull@localhost>2002-11-21 11:15:37 +0000
committerHolger Waechtler <devnull@localhost>2002-11-21 11:15:37 +0000
commitf5021a7def1b67f972d71eb6d4817fcf8ebe87d3 (patch)
treeffc9d110db4e6faaa1e6725ad288422f4b72725b /linux
parent53c4b9cd3c7f3122090bf249005873ec11fd642f (diff)
downloadmediapointer-dvb-s2-f5021a7def1b67f972d71eb6d4817fcf8ebe87d3.tar.gz
mediapointer-dvb-s2-f5021a7def1b67f972d71eb6d4817fcf8ebe87d3.tar.bz2
replaced down_interruptible() by non-interruptible down() and changed
kdvb-fe thread exit code - hopefully this resolves the problems reported with occasional oopses at deinitialisation time...
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_frontend.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
index 05118eaec..9da066fec 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -154,6 +154,7 @@ void dvb_bend_frequency (struct dvb_frontend_data *this_fe, int recursive)
if (!recursive) {
if (down_interruptible (&frontend_mutex))
return;
+
this_fe->bending = 0;
}
@@ -496,10 +497,9 @@ void dvb_frontend_stop (struct dvb_frontend_data *fe)
{
dprintk ("%s\n", __FUNCTION__);
- fe->exit = 1;
- wake_up_interruptible (&fe->wait_queue);
-
while (fe->thread) {
+ fe->exit = 1;
+ wake_up_interruptible (&fe->wait_queue);
current->state = TASK_INTERRUPTIBLE;
schedule_timeout (5);
};
@@ -687,8 +687,7 @@ dvb_remove_frontend_ioctls (struct dvb_adapter *adapter,
dprintk ("%s\n", __FUNCTION__);
- if (down_interruptible (&frontend_mutex))
- return;
+ down (&frontend_mutex);
list_for_each (entry, &frontend_list) {
struct dvb_frontend_data *fe;
@@ -780,8 +779,7 @@ dvb_remove_frontend_notifier (struct dvb_adapter *adapter,
dprintk ("%s\n", __FUNCTION__);
- if (down_interruptible (&frontend_mutex))
- return;
+ down (&frontend_mutex);
list_for_each (entry, &frontend_list) {
struct dvb_frontend_data *fe;
@@ -918,8 +916,7 @@ int dvb_unregister_frontend (int (*ioctl) (struct dvb_frontend *frontend,
dprintk ("%s\n", __FUNCTION__);
- if (down_interruptible (&frontend_mutex))
- return -ERESTARTSYS;
+ down (&frontend_mutex);
list_for_each_safe (entry, n, &frontend_list) {
struct dvb_frontend_data *fe;
@@ -928,10 +925,8 @@ int dvb_unregister_frontend (int (*ioctl) (struct dvb_frontend *frontend,
if (fe->frontend.ioctl == ioctl && fe->frontend.i2c == i2c) {
dvb_unregister_device (fe->dvbdev);
-
list_del (entry);
up (&frontend_mutex);
-
dvb_frontend_stop (fe);
kfree (fe);
return 0;