summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_frontend.c6
-rw-r--r--linux/drivers/media/video/msp3400-driver.c7
-rw-r--r--linux/drivers/media/video/video-buf-dvb.c6
-rw-r--r--linux/drivers/media/video/vivi.c7
-rw-r--r--v4l/compat.h9
5 files changed, 9 insertions, 26 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
index f39e3504d..319dccf5f 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -540,14 +540,8 @@ restart:
break;
}
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
if (try_to_freeze())
goto restart;
-#else
- if (current->flags & PF_FREEZE) {
- refrigerator (PF_FREEZE);
- }
-#endif
if (down_interruptible(&fepriv->sem))
break;
diff --git a/linux/drivers/media/video/msp3400-driver.c b/linux/drivers/media/video/msp3400-driver.c
index f03cc0032..159df7726 100644
--- a/linux/drivers/media/video/msp3400-driver.c
+++ b/linux/drivers/media/video/msp3400-driver.c
@@ -399,16 +399,9 @@ int msp_sleep(struct msp_state *state, int timeout)
(msecs_to_jiffies(timeout));
}
}
-#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,12)) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
- if (current->flags & PF_FREEZE) {
- refrigerator (PF_FREEZE);
- }
-#endif
remove_wait_queue(&state->wq, &wait);
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,12)
try_to_freeze();
-#endif
return state->restart;
}
diff --git a/linux/drivers/media/video/video-buf-dvb.c b/linux/drivers/media/video/video-buf-dvb.c
index 86993f95a..2f730ce60 100644
--- a/linux/drivers/media/video/video-buf-dvb.c
+++ b/linux/drivers/media/video/video-buf-dvb.c
@@ -68,13 +68,7 @@ static int videobuf_dvb_thread(void *data)
break;
if (kthread_should_stop())
break;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
try_to_freeze();
-#else
- if (current->flags & PF_FREEZE) {
- refrigerator (PF_FREEZE);
- }
-#endif
/* feed buffer data to demux */
if (buf->state == STATE_DONE)
diff --git a/linux/drivers/media/video/vivi.c b/linux/drivers/media/video/vivi.c
index 798e711f4..5dd6dd096 100644
--- a/linux/drivers/media/video/vivi.c
+++ b/linux/drivers/media/video/vivi.c
@@ -586,16 +586,9 @@ static void vivi_sleep(struct vivi_dmaqueue *dma_q)
schedule_timeout_interruptible (timeout);
}
-#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,12)) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
- if (current->flags & PF_FREEZE) {
- refrigerator (PF_FREEZE);
- }
-#endif
remove_wait_queue(&dma_q->wq, &wait);
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,12)
try_to_freeze();
-#endif
}
static int vivi_thread(void *data)
diff --git a/v4l/compat.h b/v4l/compat.h
index 6ba49e825..ffe4e97a5 100644
--- a/v4l/compat.h
+++ b/v4l/compat.h
@@ -236,6 +236,15 @@ static inline unsigned long vmalloc_to_pfn(void * vmalloc_addr)
#endif
#endif
+/* try_to_freeze() lost its argument. Must appear after linux/sched.h */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) && defined(_LINUX_SCHED_H)
+# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+# define try_to_freeze() try_to_freeze(PF_FREEZE)
+# else
+# define try_to_freeze() (0)
+# endif
+#endif
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
#ifndef kzalloc
#define kzalloc(size, flags) \