summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolger Waechtler <devnull@localhost>2002-11-11 11:03:48 +0000
committerHolger Waechtler <devnull@localhost>2002-11-11 11:03:48 +0000
commit4485c9c51bad73f2cb53836115dd090836750968 (patch)
tree3590bfd9944f2e4c162f9540d71f9c489d54ad60
parent95d9da80ef7df209ccee580f32046aebb1eadf78 (diff)
downloadmediapointer-dvb-s2-4485c9c51bad73f2cb53836115dd090836750968.tar.gz
mediapointer-dvb-s2-4485c9c51bad73f2cb53836115dd090836750968.tar.bz2
fake cond_resched for kernels < 2.4.20 and reintroduce the lost minor() fake
-rw-r--r--linux/drivers/media/dvb/dvb-core/compat.h13
1 files changed, 11 insertions, 2 deletions
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);