From 05b53c9496a983368010957f56176bc9f73958b9 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Thu, 13 Jul 2000 17:25:06 +0000 Subject: [PATCH] compilation fixes --- comedi/comedi_fops.c | 8 ++++---- comedi/drivers.c | 2 +- comedi/kern_compat.h | 11 ++++++----- scripts/config.in | 2 +- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/comedi/comedi_fops.c b/comedi/comedi_fops.c index ef4bc793..fb79b8b5 100644 --- a/comedi/comedi_fops.c +++ b/comedi/comedi_fops.c @@ -1539,7 +1539,7 @@ void mite_cleanup(void); void init_drivers(void); -void comedi_init(void) +int comedi_init(void) { int i; @@ -1566,6 +1566,8 @@ void comedi_init(void) comedi_rt_init(); #endif init_drivers(); + + return 0; } void comedi_cleanup(void) @@ -1599,9 +1601,7 @@ void comedi_cleanup(void) #ifdef MODULE int init_module(void) { - comedi_init(); - - return 0; + return comedi_init(); } int cleanup_module(void) diff --git a/comedi/drivers.c b/comedi/drivers.c index dcfc58b9..93ea63d8 100644 --- a/comedi/drivers.c +++ b/comedi/drivers.c @@ -123,7 +123,7 @@ attached: dev->attached=1; dev->driver=driv; - if(driver->module) + if(driv->module) __MOD_INC_USE_COUNT(driv->module); return 0; diff --git a/comedi/kern_compat.h b/comedi/kern_compat.h index 36482194..716bb374 100644 --- a/comedi/kern_compat.h +++ b/comedi/kern_compat.h @@ -211,18 +211,19 @@ typedef struct wait_queue *wait_queue_head_t; #if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0) /* ? */ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,0) #ifdef MODULE - /* don't ask. It works. */ - #define THIS_MODULE ((struct module *)&mod_use_count_) + /* don't ask. It works. */ + #define THIS_MODULE ((struct module *)&mod_use_count_) #else - #define THIS_MODULE NULL + #define THIS_MODULE NULL #endif #define __MOD_INC_USE_COUNT(x) ((*(long *)(x))++, (*(long *)(x)) |= MOD_VISITED) #define __MOD_DEC_USE_COUNT(x) ((*(long *)(x))--, (*(long *)(x)) |= MOD_VISITED) #else #ifdef MODULE - #define THIS_MODULE &__this_module + #define THIS_MODULE &__this_module #else - #define THIS_MODULE NULL + #define THIS_MODULE NULL + #endif #endif #endif diff --git a/scripts/config.in b/scripts/config.in index afd59d8d..11b511cb 100644 --- a/scripts/config.in +++ b/scripts/config.in @@ -1,5 +1,5 @@ -define_bool CONFIG_COMEDI=m +define_bool CONFIG_COMEDI m source comedi/Config.in -- 2.26.2