From 4485c9c51bad73f2cb53836115dd090836750968 Mon Sep 17 00:00:00 2001 From: Holger Waechtler Date: Mon, 11 Nov 2002 11:03:48 +0000 Subject: fake cond_resched for kernels < 2.4.20 and reintroduce the lost minor() fake --- linux/drivers/media/dvb/dvb-core/compat.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/dvb/dvb-core/compat.h b/linux/drivers/media/dvb/dvb-core/compat.h index 1dafb80a5..0e1781bad 100644 --- a/linux/drivers/media/dvb/dvb-core/compat.h +++ b/linux/drivers/media/dvb/dvb-core/compat.h @@ -42,16 +42,25 @@ extern int generic_usercopy(struct inode *inode, struct file *file, unsigned int cmd, void *arg)); #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) -#define video_devdata(dev) (dev->priv) +#ifndef minor +#define minor(dev) MINOR(dev) +#endif + +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,20)) static inline void cond_resched (void) { if (current->need_resched) schedule(); } +#endif + + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) + +#define video_devdata(dev) (dev->priv) extern struct page * vmalloc_to_page(void *addr); -- cgit v1.2.3