diff options
author | Trent Piepho <xyzzy@speakeasy.org> | 2007-02-19 15:57:38 -0800 |
---|---|---|
committer | Trent Piepho <xyzzy@speakeasy.org> | 2007-02-19 15:57:38 -0800 |
commit | 6414245c8fb95b7664678c441f8d84ef047d6489 (patch) | |
tree | 3a752553208d9a70db5d8138fcf53c2e17879ca3 /v4l | |
parent | 3f9c226d66a931318cf7bfcf861ce191007013e6 (diff) | |
download | mediapointer-dvb-s2-6414245c8fb95b7664678c441f8d84ef047d6489.tar.gz mediapointer-dvb-s2-6414245c8fb95b7664678c441f8d84ef047d6489.tar.bz2 |
compat: Add code to compat.h for try_to_sleep()
From: Trent Piepho <xyzzy@speakeasy.org>
Compat.h used to have an argument, now it doesn't. There was also some code:
if (current->flags & PF_FREEZE) { refrigerator(PF_FREEZE); }
which is the same as try_to_freeze(), and so can be replaced by it.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Diffstat (limited to 'v4l')
-rw-r--r-- | v4l/compat.h | 9 |
1 files changed, 9 insertions, 0 deletions
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) \ |