Commit 6e761a42 authored by David Jeffery's avatar David Jeffery Committed by Linus Torvalds

[PATCH] ips: remove LinuxVersionCode

This removes the old LinuxVersionCode() and replaces it with
KERNEL_VERSION().  Thanks go to Adrian Bunk for sending the initial
version.
parent c17ac748
...@@ -202,7 +202,7 @@ ...@@ -202,7 +202,7 @@
#error "This driver has only been tested on the x86/ia64 platforms" #error "This driver has only been tested on the x86/ia64 platforms"
#endif #endif
#if LINUX_VERSION_CODE <= LinuxVersionCode(2,5,0) #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,0)
#include "sd.h" #include "sd.h"
#define IPS_SG_ADDRESS(sg) ((sg)->address) #define IPS_SG_ADDRESS(sg) ((sg)->address)
#define IPS_LOCK_SAVE(lock,flags) spin_lock_irqsave(&io_request_lock,flags) #define IPS_LOCK_SAVE(lock,flags) spin_lock_irqsave(&io_request_lock,flags)
...@@ -1136,7 +1136,7 @@ ips_queue(Scsi_Cmnd *SC, void (*done) (Scsi_Cmnd *)) { ...@@ -1136,7 +1136,7 @@ ips_queue(Scsi_Cmnd *SC, void (*done) (Scsi_Cmnd *)) {
/* */ /* */
/****************************************************************************/ /****************************************************************************/
static int static int
#if LINUX_VERSION_CODE < LinuxVersionCode(2,5,0) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
ips_biosparam(Disk *disk, kdev_t dev, int geom[]) { ips_biosparam(Disk *disk, kdev_t dev, int geom[]) {
ips_ha_t *ha = (ips_ha_t *) disk->device->host->hostdata; ips_ha_t *ha = (ips_ha_t *) disk->device->host->hostdata;
unsigned long capacity = disk->capacity; unsigned long capacity = disk->capacity;
...@@ -1182,7 +1182,7 @@ ips_biosparam(struct scsi_device *sdev, struct block_device *bdev, ...@@ -1182,7 +1182,7 @@ ips_biosparam(struct scsi_device *sdev, struct block_device *bdev,
return (0); return (0);
} }
#if LINUX_VERSION_CODE < LinuxVersionCode(2,5,0) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
/****************************************************************************/ /****************************************************************************/
/* */ /* */
/* Routine Name: ips_select_queue_depth */ /* Routine Name: ips_select_queue_depth */
...@@ -6755,7 +6755,7 @@ ips_register_scsi( int index){ ...@@ -6755,7 +6755,7 @@ ips_register_scsi( int index){
sh->unchecked_isa_dma = sh->hostt->unchecked_isa_dma; sh->unchecked_isa_dma = sh->hostt->unchecked_isa_dma;
sh->use_clustering = sh->hostt->use_clustering; sh->use_clustering = sh->hostt->use_clustering;
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,7) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,7)
sh->max_sectors = 128; sh->max_sectors = 128;
#endif #endif
...@@ -7138,7 +7138,7 @@ static int ips_init_phase2( int index ) ...@@ -7138,7 +7138,7 @@ static int ips_init_phase2( int index )
} }
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,9) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,9)
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
#endif #endif
......
...@@ -64,11 +64,7 @@ ...@@ -64,11 +64,7 @@
/* /*
* Some handy macros * Some handy macros
*/ */
#ifndef LinuxVersionCode #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,20) || defined CONFIG_HIGHIO
#define LinuxVersionCode(x,y,z) (((x)<<16)+((y)<<8)+(z))
#endif
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,20) || defined CONFIG_HIGHIO
#define IPS_HIGHIO #define IPS_HIGHIO
#define IPS_HIGHMEM_IO .highmem_io = 1, #define IPS_HIGHMEM_IO .highmem_io = 1,
#else #else
...@@ -97,12 +93,12 @@ ...@@ -97,12 +93,12 @@
#define IPS_SGLIST_SIZE(ha) (IPS_USE_ENH_SGLIST(ha) ? \ #define IPS_SGLIST_SIZE(ha) (IPS_USE_ENH_SGLIST(ha) ? \
sizeof(IPS_ENH_SG_LIST) : sizeof(IPS_STD_SG_LIST)) sizeof(IPS_ENH_SG_LIST) : sizeof(IPS_STD_SG_LIST))
#if LINUX_VERSION_CODE < LinuxVersionCode(2,4,4) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,4)
#define pci_set_dma_mask(dev,mask) (1) #define pci_set_dma_mask(dev,mask) (1)
#define scsi_set_pci_device(sh,dev) (0) #define scsi_set_pci_device(sh,dev) (0)
#endif #endif
#if LINUX_VERSION_CODE < LinuxVersionCode(2,5,0) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
#define scsi_register_host(x) scsi_register_module(MODULE_SCSI_HA,x) #define scsi_register_host(x) scsi_register_module(MODULE_SCSI_HA,x)
#define scsi_unregister_host(x) scsi_unregister_module(MODULE_SCSI_HA,x) #define scsi_unregister_host(x) scsi_unregister_module(MODULE_SCSI_HA,x)
#endif #endif
...@@ -439,7 +435,7 @@ ...@@ -439,7 +435,7 @@
/* /*
* Scsi_Host Template * Scsi_Host Template
*/ */
#if LINUX_VERSION_CODE < LinuxVersionCode(2,5,0) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
static void ips_select_queue_depth(struct Scsi_Host *, Scsi_Device *); static void ips_select_queue_depth(struct Scsi_Host *, Scsi_Device *);
static int ips_biosparam(Disk *disk, kdev_t dev, int geom[]); static int ips_biosparam(Disk *disk, kdev_t dev, int geom[]);
#define IPS { \ #define IPS { \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment