small drivers/char/ip2* cleanup
PATCH 1/1 small drivers/char/ip2* cleanup
The patch below is a small drivers/char/ip2* cleanup, mostly the removal of #if's for kernel 2.0 and the expansion of some macros.
diffstat output:
ip2.c | 18 +-- ip2/i2lib.c | 2 ip2/i2os.h | 18 --- ip2main.c | 328 +++++++++++++++++------------------------------------------- 4 files changed, 105 insertions(+), 261 deletions(-)
Please apply
Adrian
drivers/char/ip2.c renamed from drivers/char/ip2.c.old +8 -10
@@ -38,16 +38,14 @@static int poll_only =0 ; -# if LINUX_VERSION_CODE >=KERNEL_VERSION (2 ,1 ,0 ) -MODULE_AUTHOR ("Doug McNash" ); -MODULE_DESCRIPTION ("Computone IntelliPort Plus Driver" ); - MODULE_PARM(irq,"1-"__MODULE_STRING(IP2_MAX_BOARDS) "i"); -MODULE_PARM_DESC (irq,"Interrupts for IntelliPort Cards" ); - MODULE_PARM(io,"1-"__MODULE_STRING(IP2_MAX_BOARDS) "i"); -MODULE_PARM_DESC (io,"I/O ports for IntelliPort Cards" ); -MODULE_PARM (poll_only,"1i" ); -MODULE_PARM_DESC (poll_only,"Do not use card interrupts" ); -# endif /* LINUX_VERSION */ +MODULE_AUTHOR ("Doug McNash" ); +MODULE_DESCRIPTION ("Computone IntelliPort Plus Driver" ); +MODULE_PARM(irq,"1-"__MODULE_STRING(IP2_MAX_BOARDS) "i"); +MODULE_PARM_DESC (irq,"Interrupts for IntelliPort Cards" ); +MODULE_PARM(io,"1-"__MODULE_STRING(IP2_MAX_BOARDS) "i"); +MODULE_PARM_DESC (io,"I/O ports for IntelliPort Cards" ); +MODULE_PARM (poll_only,"1i" ); +MODULE_PARM_DESC (poll_only,"Do not use card interrupts" );//======================================================================
drivers/char/ip2main.c renamed from drivers/char/ip2main.c.old +96 -232
490 lines not on this page · raw message
drivers/char/ip2/i2lib.c renamed from drivers/char/ip2/i2lib.c.old +1 -1
@@ -1089,7 +1089,7 @@// Move the data if ( user ) { -COPY_FROM_USER (rc, (char *)(DATA_OF (pInsert)), pSource, + rc =copy_from_user ((char *)(DATA_OF (pInsert)), pSource, amountToMove ); }else {memcpy ( (char *)(DATA_OF (pInsert)), pSource, amountToMove );
drivers/char/ip2/i2os.h renamed from drivers/char/ip2/i2os.h.old +0 -18
@@ -19,8 +19,6 @@#ifndef I2OS_H /* To prevent multiple includes */ #define I2OS_H 1 -#define VERSION (ver,rel,seq) (((ver)<<16) | ((rel)<<8) | (seq)) -//------------------------------------------------- // Required Includes //-------------------------------------------------
@@ -46,22 +44,6 @@// Interrupt control //-------------------------------------------- -#if LINUX_VERSION_CODE <0x00020100 -typedef int spinlock_t ; -#define spin_lock_init () -#define spin_lock(a) -#define spin_unlock (a) -#define spin_lock_irqsave (a,b) {save_flags((b));cli();} -#define spin_unlock_irqrestore (a,b) {restore_flags((b));} -#define write_lock_irqsave (a,b) spin_lock_irqsave(a,b) -#define write_unlock_irqrestore (a,b) spin_unlock_irqrestore(a,b) -#define read_lock_irqsave (a,b) spin_lock_irqsave(a,b) -#define read_unlock_irqrestore (a,b) spin_unlock_irqrestore(a,b) -#endif - -//#define SAVE_AND_DISABLE_INTS(a,b) spin_lock_irqsave(a,b) -//#define RESTORE_INTS(a,b) spin_unlock_irqrestore(a,b) -#define LOCK_INIT (a) rwlock_init(a)#define SAVE_AND_DISABLE_INTS (a,b) { \