Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-dvb] [patch] suspend fix #1
Hi,
The dvb frontend kernel thread doesn't survive a standby/suspend,
the patch below fixes this.
Gerd
Index: linux-2.6.8/drivers/media/dvb/dvb-core/dvb_frontend.c
===================================================================
--- linux-2.6.8.orig/drivers/media/dvb/dvb-core/dvb_frontend.c 2004-10-08 11:55:36.000000000 +0200
+++ linux-2.6.8/drivers/media/dvb/dvb-core/dvb_frontend.c 2004-10-12 09:29:44.898980496 +0200
@@ -34,6 +34,7 @@
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/list.h>
+#include <linux/suspend.h>
#include <asm/processor.h>
#include <asm/semaphore.h>
@@ -489,6 +490,9 @@ static void dvb_frontend_wakeup (struct
wake_up_interruptible(&fe->wait_queue);
}
+/*
+ * FIXME: use linux/kthread.h
+ */
static int dvb_frontend_thread (void *data)
{
struct dvb_frontend_data *fe = (struct dvb_frontend_data *) data;
@@ -516,10 +520,17 @@ static int dvb_frontend_thread (void *da
up (&fe->sem); /* is locked when we enter the thread... */
timeout = wait_event_interruptible_timeout(fe->wait_queue,0 != dvb_frontend_should_wakeup (fe), delay);
- if (-ERESTARTSYS == timeout || 0 != dvb_frontend_is_exiting (fe)) {
- /* got signal or quitting */
+#if 0
+ if (-ERESTARTSYS == timeout)
+ /* got signal - FIXME: suspend triggeres this as well */
break;
- }
+#endif
+ if (0 != dvb_frontend_is_exiting (fe))
+ /* quitting */
+ break;
+
+ if (current->flags & PF_FREEZE)
+ refrigerator(PF_FREEZE);
if (down_interruptible (&fe->sem))
break;
Home |
Main Index |
Thread Index