From 5cec2f74a2613080d64906387805d2885b4f8745 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Mon, 27 Aug 2001 09:58:00 +0000 Subject: [PATCH] Fixes for compilation on 2.0.x --- comedi/comedi_fops.c | 4 ++++ comedi/kcomedilib/data.c | 3 --- comedi/kcomedilib/dio.c | 3 --- comedi/kcomedilib/kcomedilib_main.c | 3 --- comedi/kcomedilib/ksyms.c | 2 +- comedi/proc.c | 8 ++++---- 6 files changed, 9 insertions(+), 14 deletions(-) diff --git a/comedi/comedi_fops.c b/comedi/comedi_fops.c index b998b46e..0b4d9a53 100644 --- a/comedi/comedi_fops.c +++ b/comedi/comedi_fops.c @@ -1697,19 +1697,23 @@ static int comedi_close_v22(struct inode *inode,struct file *file) dev->use_count--; +#if LINUX_VERSION_CODE >= 0x020100 if(file->f_flags & FASYNC){ comedi_fasync(-1,file,0); } +#endif return 0; } +#if LINUX_VERSION_CODE >= 0x020100 static int comedi_fasync (int fd, struct file *file, int on) { comedi_device *dev=comedi_get_device_by_minor(MINOR(RDEV_OF_FILE(file))); return fasync_helper(fd,file,on,&dev->async_queue); } +#endif /* kernel compatibility diff --git a/comedi/kcomedilib/data.c b/comedi/kcomedilib/data.c index a9e6fe03..bb70b53d 100644 --- a/comedi/kcomedilib/data.c +++ b/comedi/kcomedilib/data.c @@ -36,9 +36,6 @@ #include #include #include -#ifdef LINUX_V22 -#include -#endif #define USE_INSN diff --git a/comedi/kcomedilib/dio.c b/comedi/kcomedilib/dio.c index 7ed37bea..d2b9a819 100644 --- a/comedi/kcomedilib/dio.c +++ b/comedi/kcomedilib/dio.c @@ -36,9 +36,6 @@ #include #include #include -#ifdef LINUX_V22 -#include -#endif #define USE_INSN diff --git a/comedi/kcomedilib/kcomedilib_main.c b/comedi/kcomedilib/kcomedilib_main.c index f22e7190..ac23ddca 100644 --- a/comedi/kcomedilib/kcomedilib_main.c +++ b/comedi/kcomedilib/kcomedilib_main.c @@ -35,9 +35,6 @@ #include #include #include -#ifdef LINUX_V22 -#include -#endif #include #include diff --git a/comedi/kcomedilib/ksyms.c b/comedi/kcomedilib/ksyms.c index 5cf236c8..e7cfd4af 100644 --- a/comedi/kcomedilib/ksyms.c +++ b/comedi/kcomedilib/ksyms.c @@ -39,7 +39,7 @@ #include -#ifdef LINUX_V22 +#if LINUX_VERSION_CODE >= 0x020200 /* functions specific to kcomedilib */ diff --git a/comedi/proc.c b/comedi/proc.c index c0733449..219e0a15 100644 --- a/comedi/proc.c +++ b/comedi/proc.c @@ -34,7 +34,7 @@ #include -#ifdef LINUX_V20 +#if LINUX_VERSION_CODE < 0x020100 int comedi_read_procmem(char *buf,char **start,off_t offset,int len,int unused); struct proc_dir_entry comedi_proc_entry = @@ -56,7 +56,7 @@ int comedi_read_procmem(char *buf,char **start,off_t offset,int len,int *eof,voi extern comedi_driver *comedi_drivers; -#ifdef LINUX_V20 +#if LINUX_VERSION_CODE < 0x020100 int comedi_read_procmem(char *buf,char **start,off_t offset,int len,int unused) #else int comedi_read_procmem(char *buf,char **start,off_t offset,int len,int *eof,void *data) @@ -107,7 +107,7 @@ int comedi_read_procmem(char *buf,char **start,off_t offset,int len,int *eof,voi void comedi_proc_init(void) { -#ifdef LINUX_V20 +#if LINUX_VERSION_CODE < 0x020100 proc_register_dynamic(&proc_root,&comedi_proc_entry); #else struct proc_dir_entry *comedi_proc; @@ -120,7 +120,7 @@ void comedi_proc_init(void) void comedi_proc_cleanup(void) { -#ifdef LINUX_V20 +#if LINUX_VERSION_CODE < 0x020100 proc_unregister(&proc_root,comedi_proc_entry.low_ino); #else remove_proc_entry("comedi",0); -- 2.26.2