summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-11-02 18:40:13 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-11-02 18:40:13 -0200
commita10e3e59904fd6ce093ec74c0ad541afbbebc3e2 (patch)
tree2b58019e75b62bcefc59c64cb420e1ba79b26912 /linux
parent402c1ace76e132bcff86383212b3d2c66b40fd77 (diff)
downloadmediapointer-dvb-s2-a10e3e59904fd6ce093ec74c0ad541afbbebc3e2.tar.gz
mediapointer-dvb-s2-a10e3e59904fd6ce093ec74c0ad541afbbebc3e2.tar.bz2
backport commit e42837bcd35b75bb59ae5d3e62f87be1aeeb05c3
kernel-sync: Author: Rafael J. Wysocki <rjw@sisk.pl> Date: Thu Oct 18 03:04:45 2007 -0700 freezer: introduce freezer-friendly waiting macros Introduce freezer-friendly wrappers around wait_event_interruptible() and wait_event_interruptible_timeout(), originally defined in <linux/wait.h>, to be used in freezable kernel threads. Make some of the freezable kernel threads use them. This is necessary for the freezer to stop sending signals to kernel threads, which is implemented in the next patch. From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_frontend.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
index 4f872ef7b..ce24996d8 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -531,9 +531,16 @@ static int dvb_frontend_thread(void *data)
while (1) {
up(&fepriv->sem); /* is locked when we enter the thread... */
restart:
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
timeout = wait_event_interruptible_timeout(fepriv->wait_queue,
dvb_frontend_should_wakeup(fe) || kthread_should_stop(),
fepriv->delay);
+#else
+ timeout = wait_event_interruptible_timeout(fepriv->wait_queue,
+ dvb_frontend_should_wakeup(fe) || kthread_should_stop()
+ || freezing(current),
+ fepriv->delay);
+#endif
if (kthread_should_stop() || dvb_frontend_is_exiting(fe)) {
/* got signal or quitting */