Commit 00d412d2 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://kernel.bkbits.net/jgarzik/net-drivers-2.5

into home.transmeta.com:/home/torvalds/v2.5/linux
parents dda0d60c 1357129c
...@@ -269,7 +269,7 @@ static void set_ioapic_affinity (unsigned int irq, unsigned long mask) ...@@ -269,7 +269,7 @@ static void set_ioapic_affinity (unsigned int irq, unsigned long mask)
# include <linux/slab.h> /* kmalloc() */ # include <linux/slab.h> /* kmalloc() */
# include <linux/timer.h> /* time_after() */ # include <linux/timer.h> /* time_after() */
# if CONFIG_BALANCED_IRQ_DEBUG # ifdef CONFIG_BALANCED_IRQ_DEBUG
# define TDprintk(x...) do { printk("<%ld:%s:%d>: ", jiffies, __FILE__, __LINE__); printk(x); } while (0) # define TDprintk(x...) do { printk("<%ld:%s:%d>: ", jiffies, __FILE__, __LINE__); printk(x); } while (0)
# define Dprintk(x...) do { TDprintk(x); } while (0) # define Dprintk(x...) do { TDprintk(x); } while (0)
# else # else
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
/* /*
* core module and version information * core module and version information
*/ */
#define RNG_VERSION "0.9.0" #define RNG_VERSION "1.0.0"
#define RNG_MODULE_NAME "hw_random" #define RNG_MODULE_NAME "hw_random"
#define RNG_DRIVER_NAME RNG_MODULE_NAME " hardware driver " RNG_VERSION #define RNG_DRIVER_NAME RNG_MODULE_NAME " hardware driver " RNG_VERSION
#define PFX RNG_MODULE_NAME ": " #define PFX RNG_MODULE_NAME ": "
...@@ -499,7 +499,7 @@ static ssize_t rng_dev_read (struct file *filp, char *buf, size_t size, ...@@ -499,7 +499,7 @@ static ssize_t rng_dev_read (struct file *filp, char *buf, size_t size,
spin_unlock (&rng_lock); spin_unlock (&rng_lock);
while (have_data > 0) { while (have_data && size) {
if (put_user((u8)data, buf++)) { if (put_user((u8)data, buf++)) {
ret = ret ? : -EFAULT; ret = ret ? : -EFAULT;
break; break;
......
...@@ -115,15 +115,15 @@ ...@@ -115,15 +115,15 @@
**========================================================== **==========================================================
*/ */
#define LinuxVersionCode(v, p, s) (((v)<<16)+((p)<<8)+(s)) #include <linux/version.h>
#include <linux/module.h> #include <linux/module.h>
#include <asm/dma.h> #include <asm/dma.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/system.h> #include <asm/system.h>
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,3,17) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,17)
#include <linux/spinlock.h> #include <linux/spinlock.h>
#elif LINUX_VERSION_CODE >= LinuxVersionCode(2,1,93) #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,93)
#include <asm/spinlock.h> #include <asm/spinlock.h>
#endif #endif
#include <linux/delay.h> #include <linux/delay.h>
...@@ -140,10 +140,9 @@ ...@@ -140,10 +140,9 @@
#include <linux/timer.h> #include <linux/timer.h>
#include <linux/stat.h> #include <linux/stat.h>
#include <linux/version.h>
#include <linux/blk.h> #include <linux/blk.h>
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,1,35) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,35)
#include <linux/init.h> #include <linux/init.h>
#endif #endif
...@@ -154,7 +153,7 @@ ...@@ -154,7 +153,7 @@
#define __initdata #define __initdata
#endif #endif
#if LINUX_VERSION_CODE <= LinuxVersionCode(2,1,92) #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,1,92)
#include <linux/bios32.h> #include <linux/bios32.h>
#endif #endif
...@@ -205,7 +204,7 @@ typedef u_long vm_offset_t; ...@@ -205,7 +204,7 @@ typedef u_long vm_offset_t;
** Donnot compile integrity checking code for Linux-2.3.0 ** Donnot compile integrity checking code for Linux-2.3.0
** and above since SCSI data structures are not ready yet. ** and above since SCSI data structures are not ready yet.
*/ */
/* #if LINUX_VERSION_CODE < LinuxVersionCode(2,3,0) */ /* #if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0) */
#if 0 #if 0
#define SCSI_NCR_INTEGRITY_CHECKING #define SCSI_NCR_INTEGRITY_CHECKING
#endif #endif
...@@ -1049,7 +1048,7 @@ struct ncb { ...@@ -1049,7 +1048,7 @@ struct ncb {
/* when lcb is not allocated. */ /* when lcb is not allocated. */
Scsi_Cmnd *done_list; /* Commands waiting for done() */ Scsi_Cmnd *done_list; /* Commands waiting for done() */
/* callback to be invoked. */ /* callback to be invoked. */
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,1,93) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,93)
spinlock_t smp_lock; /* Lock for SMP threading */ spinlock_t smp_lock; /* Lock for SMP threading */
#endif #endif
...@@ -3816,7 +3815,7 @@ ncr_attach (Scsi_Host_Template *tpnt, int unit, ncr_device *device) ...@@ -3816,7 +3815,7 @@ ncr_attach (Scsi_Host_Template *tpnt, int unit, ncr_device *device)
instance->max_id = np->maxwide ? 16 : 8; instance->max_id = np->maxwide ? 16 : 8;
instance->max_lun = SCSI_NCR_MAX_LUN; instance->max_lun = SCSI_NCR_MAX_LUN;
#ifndef SCSI_NCR_IOMAPPED #ifndef SCSI_NCR_IOMAPPED
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,3,29) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,29)
instance->base = (unsigned long) np->reg; instance->base = (unsigned long) np->reg;
#else #else
instance->base = (char *) np->reg; instance->base = (char *) np->reg;
...@@ -3901,7 +3900,7 @@ ncr_attach (Scsi_Host_Template *tpnt, int unit, ncr_device *device) ...@@ -3901,7 +3900,7 @@ ncr_attach (Scsi_Host_Template *tpnt, int unit, ncr_device *device)
if (request_irq(device->slot.irq, ncr53c8xx_intr, if (request_irq(device->slot.irq, ncr53c8xx_intr,
((driver_setup.irqm & 0x10) ? 0 : SA_SHIRQ) | ((driver_setup.irqm & 0x10) ? 0 : SA_SHIRQ) |
#if LINUX_VERSION_CODE < LinuxVersionCode(2,2,0) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,2,0)
((driver_setup.irqm & 0x20) ? 0 : SA_INTERRUPT), ((driver_setup.irqm & 0x20) ? 0 : SA_INTERRUPT),
#else #else
0, 0,
...@@ -9335,7 +9334,7 @@ printk("ncr53c8xx_proc_info: hostno=%d, func=%d\n", hostno, func); ...@@ -9335,7 +9334,7 @@ printk("ncr53c8xx_proc_info: hostno=%d, func=%d\n", hostno, func);
** **
**========================================================== **==========================================================
*/ */
#if LINUX_VERSION_CODE < LinuxVersionCode(2,3,27) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,27)
static struct proc_dir_entry proc_scsi_ncr53c8xx = { static struct proc_dir_entry proc_scsi_ncr53c8xx = {
PROC_SCSI_NCR53C8XX, 9, NAME53C8XX, PROC_SCSI_NCR53C8XX, 9, NAME53C8XX,
S_IFDIR | S_IRUGO | S_IXUGO, 2 S_IFDIR | S_IRUGO | S_IXUGO, 2
...@@ -9350,7 +9349,7 @@ static struct proc_dir_entry proc_scsi_ncr53c8xx = { ...@@ -9350,7 +9349,7 @@ static struct proc_dir_entry proc_scsi_ncr53c8xx = {
*/ */
#ifdef MODULE #ifdef MODULE
char *ncr53c8xx = 0; /* command line passed by insmod */ char *ncr53c8xx = 0; /* command line passed by insmod */
# if LINUX_VERSION_CODE >= LinuxVersionCode(2,1,30) # if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,30)
MODULE_PARM(ncr53c8xx, "s"); MODULE_PARM(ncr53c8xx, "s");
# endif # endif
#endif #endif
...@@ -9360,7 +9359,7 @@ int __init ncr53c8xx_setup(char *str) ...@@ -9360,7 +9359,7 @@ int __init ncr53c8xx_setup(char *str)
return sym53c8xx__setup(str); return sym53c8xx__setup(str);
} }
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,3,13) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,13)
#ifndef MODULE #ifndef MODULE
__setup("ncr53c8xx=", ncr53c8xx_setup); __setup("ncr53c8xx=", ncr53c8xx_setup);
#endif #endif
...@@ -9469,7 +9468,7 @@ int __init ncr53c8xx_detect(Scsi_Host_Template *tpnt) ...@@ -9469,7 +9468,7 @@ int __init ncr53c8xx_detect(Scsi_Host_Template *tpnt)
** Initialize driver general stuff. ** Initialize driver general stuff.
*/ */
#ifdef SCSI_NCR_PROC_INFO_SUPPORT #ifdef SCSI_NCR_PROC_INFO_SUPPORT
#if LINUX_VERSION_CODE < LinuxVersionCode(2,3,27) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,27)
tpnt->proc_dir = &proc_scsi_ncr53c8xx; tpnt->proc_dir = &proc_scsi_ncr53c8xx;
#else #else
tpnt->proc_name = NAME53C8XX; tpnt->proc_name = NAME53C8XX;
...@@ -9502,10 +9501,10 @@ const char *ncr53c8xx_info (struct Scsi_Host *host) ...@@ -9502,10 +9501,10 @@ const char *ncr53c8xx_info (struct Scsi_Host *host)
*/ */
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
static static
#endif #endif
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0) || defined(MODULE) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) || defined(MODULE)
#ifdef ENABLE_SCSI_ZALON #ifdef ENABLE_SCSI_ZALON
Scsi_Host_Template driver_template = { Scsi_Host_Template driver_template = {
.proc_name = "zalon720", .proc_name = "zalon720",
......
...@@ -99,16 +99,16 @@ ...@@ -99,16 +99,16 @@
**========================================================== **==========================================================
*/ */
#define LinuxVersionCode(v, p, s) (((v)<<16)+((p)<<8)+(s)) #include <linux/version.h>
#include <linux/module.h> #include <linux/module.h>
#include <asm/dma.h> #include <asm/dma.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/system.h> #include <asm/system.h>
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,3,17) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,17)
#include <linux/spinlock.h> #include <linux/spinlock.h>
#elif LINUX_VERSION_CODE >= LinuxVersionCode(2,1,93) #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,93)
#include <asm/spinlock.h> #include <asm/spinlock.h>
#endif #endif
#include <linux/delay.h> #include <linux/delay.h>
...@@ -123,10 +123,9 @@ ...@@ -123,10 +123,9 @@
#include <linux/timer.h> #include <linux/timer.h>
#include <linux/stat.h> #include <linux/stat.h>
#include <linux/version.h>
#include <linux/blk.h> #include <linux/blk.h>
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,1,35) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,35)
#include <linux/init.h> #include <linux/init.h>
#endif #endif
...@@ -137,7 +136,7 @@ ...@@ -137,7 +136,7 @@
#define __initdata #define __initdata
#endif #endif
#if LINUX_VERSION_CODE <= LinuxVersionCode(2,1,92) #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,1,92)
#include <linux/bios32.h> #include <linux/bios32.h>
#endif #endif
...@@ -170,7 +169,7 @@ typedef u64 u_int64; ...@@ -170,7 +169,7 @@ typedef u64 u_int64;
** Donnot compile integrity checking code for Linux-2.3.0 ** Donnot compile integrity checking code for Linux-2.3.0
** and above since SCSI data structures are not ready yet. ** and above since SCSI data structures are not ready yet.
*/ */
/* #if LINUX_VERSION_CODE < LinuxVersionCode(2,3,0) */ /* #if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0) */
#if 0 #if 0
#define SCSI_NCR_INTEGRITY_CHECKING #define SCSI_NCR_INTEGRITY_CHECKING
#endif #endif
...@@ -183,7 +182,7 @@ typedef u64 u_int64; ...@@ -183,7 +182,7 @@ typedef u64 u_int64;
** despite the fact that the PCI specifications are looking ** despite the fact that the PCI specifications are looking
** so smart and simple! ;-) ** so smart and simple! ;-)
*/ */
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,3,47) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,47)
#define SCSI_NCR_DYNAMIC_DMA_MAPPING #define SCSI_NCR_DYNAMIC_DMA_MAPPING
#endif #endif
...@@ -439,7 +438,7 @@ static inline struct xpt_quehead *xpt_remque_tail(struct xpt_quehead *head) ...@@ -439,7 +438,7 @@ static inline struct xpt_quehead *xpt_remque_tail(struct xpt_quehead *head)
** code. ** code.
*/ */
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,2,0) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
typedef struct pci_dev *pcidev_t; typedef struct pci_dev *pcidev_t;
#define PCIDEV_NULL (0) #define PCIDEV_NULL (0)
...@@ -454,7 +453,7 @@ pci_get_base_cookie(struct pci_dev *pdev, int index) ...@@ -454,7 +453,7 @@ pci_get_base_cookie(struct pci_dev *pdev, int index)
{ {
u_long base; u_long base;
#if LINUX_VERSION_CODE > LinuxVersionCode(2,3,12) #if LINUX_VERSION_CODE > KERNEL_VERSION(2,3,12)
base = pdev->resource[index].start; base = pdev->resource[index].start;
#else #else
base = pdev->base_address[index]; base = pdev->base_address[index];
...@@ -574,13 +573,13 @@ pci_get_base_cookie(struct pci_dev *pdev, int offset) ...@@ -574,13 +573,13 @@ pci_get_base_cookie(struct pci_dev *pdev, int offset)
return base; return base;
} }
#endif /* LINUX_VERSION_CODE >= LinuxVersionCode(2,2,0) */ #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0) */
/* Does not make sense in earlier kernels */ /* Does not make sense in earlier kernels */
#if LINUX_VERSION_CODE < LinuxVersionCode(2,4,0) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
#define pci_enable_device(pdev) (0) #define pci_enable_device(pdev) (0)
#endif #endif
#if LINUX_VERSION_CODE < LinuxVersionCode(2,4,4) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,4)
#define scsi_set_pci_device(inst, pdev) (0) #define scsi_set_pci_device(inst, pdev) (0)
#endif #endif
...@@ -630,7 +629,7 @@ static int ncr_debug = SCSI_NCR_DEBUG_FLAGS; ...@@ -630,7 +629,7 @@ static int ncr_debug = SCSI_NCR_DEBUG_FLAGS;
** wished (e.g.: threaded by controller). ** wished (e.g.: threaded by controller).
*/ */
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,1,93) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,93)
spinlock_t sym53c8xx_lock = SPIN_LOCK_UNLOCKED; spinlock_t sym53c8xx_lock = SPIN_LOCK_UNLOCKED;
#define NCR_LOCK_DRIVER(flags) spin_lock_irqsave(&sym53c8xx_lock, flags) #define NCR_LOCK_DRIVER(flags) spin_lock_irqsave(&sym53c8xx_lock, flags)
...@@ -670,7 +669,7 @@ spinlock_t sym53c8xx_lock = SPIN_LOCK_UNLOCKED; ...@@ -670,7 +669,7 @@ spinlock_t sym53c8xx_lock = SPIN_LOCK_UNLOCKED;
** architecture. ** architecture.
*/ */
#if LINUX_VERSION_CODE < LinuxVersionCode(2,1,0) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,0)
#define ioremap vremap #define ioremap vremap
#define iounmap vfree #define iounmap vfree
#endif #endif
...@@ -713,7 +712,7 @@ static void __init unmap_pci_mem(u_long vaddr, u_long size) ...@@ -713,7 +712,7 @@ static void __init unmap_pci_mem(u_long vaddr, u_long size)
** inaccurate on Pentium processors. ** inaccurate on Pentium processors.
*/ */
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,1,105) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,105)
#define UDELAY udelay #define UDELAY udelay
#define MDELAY mdelay #define MDELAY mdelay
#else #else
...@@ -735,7 +734,7 @@ static void MDELAY(long ms) { while (ms--) UDELAY(1000); } ...@@ -735,7 +734,7 @@ static void MDELAY(long ms) { while (ms--) UDELAY(1000); }
** real bus astraction, btw). ** real bus astraction, btw).
*/ */
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,1,0) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,0)
#define __GetFreePages(flags, order) __get_free_pages(flags, order) #define __GetFreePages(flags, order) __get_free_pages(flags, order)
#else #else
#define __GetFreePages(flags, order) __get_free_pages(flags, order, 0) #define __GetFreePages(flags, order) __get_free_pages(flags, order, 0)
...@@ -1282,7 +1281,7 @@ static __inline__ int scsi_data_direction(Scsi_Cmnd *cmd) ...@@ -1282,7 +1281,7 @@ static __inline__ int scsi_data_direction(Scsi_Cmnd *cmd)
/* /*
** /proc directory entry and proc_info function ** /proc directory entry and proc_info function
*/ */
#if LINUX_VERSION_CODE < LinuxVersionCode(2,3,27) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,27)
static struct proc_dir_entry proc_scsi_sym53c8xx = { static struct proc_dir_entry proc_scsi_sym53c8xx = {
PROC_SCSI_SYM53C8XX, 9, NAME53C8XX, PROC_SCSI_SYM53C8XX, 9, NAME53C8XX,
S_IFDIR | S_IRUGO | S_IXUGO, 2 S_IFDIR | S_IRUGO | S_IXUGO, 2
...@@ -1307,7 +1306,7 @@ static struct ncr_driver_setup ...@@ -1307,7 +1306,7 @@ static struct ncr_driver_setup
driver_safe_setup __initdata = SCSI_NCR_DRIVER_SAFE_SETUP; driver_safe_setup __initdata = SCSI_NCR_DRIVER_SAFE_SETUP;
# ifdef MODULE # ifdef MODULE
char *sym53c8xx = 0; /* command line passed by insmod */ char *sym53c8xx = 0; /* command line passed by insmod */
# if LINUX_VERSION_CODE >= LinuxVersionCode(2,1,30) # if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,30)
MODULE_PARM(sym53c8xx, "s"); MODULE_PARM(sym53c8xx, "s");
# endif # endif
# endif # endif
...@@ -2026,7 +2025,7 @@ struct ncb { ...@@ -2026,7 +2025,7 @@ struct ncb {
/* when lcb is not allocated. */ /* when lcb is not allocated. */
Scsi_Cmnd *done_list; /* Commands waiting for done() */ Scsi_Cmnd *done_list; /* Commands waiting for done() */
/* callback to be invoked. */ /* callback to be invoked. */
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,1,93) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,93)
spinlock_t smp_lock; /* Lock for SMP threading */ spinlock_t smp_lock; /* Lock for SMP threading */
#endif #endif
...@@ -5843,7 +5842,7 @@ ncr_attach (Scsi_Host_Template *tpnt, int unit, ncr_device *device) ...@@ -5843,7 +5842,7 @@ ncr_attach (Scsi_Host_Template *tpnt, int unit, ncr_device *device)
((driver_setup.irqm & 0x20) ? 0 : SA_INTERRUPT), ((driver_setup.irqm & 0x20) ? 0 : SA_INTERRUPT),
#else #else
((driver_setup.irqm & 0x10) ? 0 : SA_SHIRQ) | ((driver_setup.irqm & 0x10) ? 0 : SA_SHIRQ) |
#if LINUX_VERSION_CODE < LinuxVersionCode(2,2,0) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,2,0)
((driver_setup.irqm & 0x20) ? 0 : SA_INTERRUPT), ((driver_setup.irqm & 0x20) ? 0 : SA_INTERRUPT),
#else #else
0, 0,
...@@ -5907,7 +5906,7 @@ ncr_attach (Scsi_Host_Template *tpnt, int unit, ncr_device *device) ...@@ -5907,7 +5906,7 @@ ncr_attach (Scsi_Host_Template *tpnt, int unit, ncr_device *device)
instance->max_id = np->maxwide ? 16 : 8; instance->max_id = np->maxwide ? 16 : 8;
instance->max_lun = MAX_LUN; instance->max_lun = MAX_LUN;
#ifndef SCSI_NCR_IOMAPPED #ifndef SCSI_NCR_IOMAPPED
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,3,29) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,29)
instance->base = (unsigned long) np->reg; instance->base = (unsigned long) np->reg;
#else #else
instance->base = (char *) np->reg; instance->base = (char *) np->reg;
...@@ -7406,7 +7405,7 @@ void ncr_complete (ncb_p np, ccb_p cp) ...@@ -7406,7 +7405,7 @@ void ncr_complete (ncb_p np, ccb_p cp)
} }
} }
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,3,99) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,99)
/* /*
** Move residual byte count to user structure. ** Move residual byte count to user structure.
*/ */
...@@ -12774,7 +12773,7 @@ int __init sym53c8xx_setup(char *str) ...@@ -12774,7 +12773,7 @@ int __init sym53c8xx_setup(char *str)
return 1; return 1;
} }
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,3,13) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,13)
#ifndef MODULE #ifndef MODULE
__setup("sym53c8xx=", sym53c8xx_setup); __setup("sym53c8xx=", sym53c8xx_setup);
#endif #endif
...@@ -12915,7 +12914,7 @@ int __init sym53c8xx_detect(Scsi_Host_Template *tpnt) ...@@ -12915,7 +12914,7 @@ int __init sym53c8xx_detect(Scsi_Host_Template *tpnt)
** Initialize driver general stuff. ** Initialize driver general stuff.
*/ */
#ifdef SCSI_NCR_PROC_INFO_SUPPORT #ifdef SCSI_NCR_PROC_INFO_SUPPORT
#if LINUX_VERSION_CODE < LinuxVersionCode(2,3,27) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,27)
tpnt->proc_dir = &proc_scsi_sym53c8xx; tpnt->proc_dir = &proc_scsi_sym53c8xx;
#else #else
tpnt->proc_name = NAME53C8XX; tpnt->proc_name = NAME53C8XX;
...@@ -13244,7 +13243,7 @@ sym53c8xx_pci_init(Scsi_Host_Template *tpnt, pcidev_t pdev, ncr_device *device) ...@@ -13244,7 +13243,7 @@ sym53c8xx_pci_init(Scsi_Host_Template *tpnt, pcidev_t pdev, ncr_device *device)
pci_write_config_word(pdev, PCI_COMMAND, command); pci_write_config_word(pdev, PCI_COMMAND, command);
} }
#if LINUX_VERSION_CODE < LinuxVersionCode(2,2,0) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,2,0)
if ( is_prep ) { if ( is_prep ) {
if (io_port >= 0x10000000) { if (io_port >= 0x10000000) {
printk(NAME53C8XX ": reallocating io_port (Wacky IBM)"); printk(NAME53C8XX ": reallocating io_port (Wacky IBM)");
...@@ -13270,7 +13269,7 @@ sym53c8xx_pci_init(Scsi_Host_Template *tpnt, pcidev_t pdev, ncr_device *device) ...@@ -13270,7 +13269,7 @@ sym53c8xx_pci_init(Scsi_Host_Template *tpnt, pcidev_t pdev, ncr_device *device)
#if defined(__i386__) && !defined(MODULE) #if defined(__i386__) && !defined(MODULE)
if (!cache_line_size) { if (!cache_line_size) {
#if LINUX_VERSION_CODE < LinuxVersionCode(2,1,75) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,75)
extern char x86; extern char x86;
switch(x86) { switch(x86) {
#else #else
...@@ -14719,10 +14718,10 @@ sym_read_Tekram_nvram (ncr_slot *np, u_short device_id, Tekram_nvram *nvram) ...@@ -14719,10 +14718,10 @@ sym_read_Tekram_nvram (ncr_slot *np, u_short device_id, Tekram_nvram *nvram)
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
static static
#endif #endif
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0) || defined(MODULE) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) || defined(MODULE)
Scsi_Host_Template driver_template = SYM53C8XX; Scsi_Host_Template driver_template = SYM53C8XX;
#include "scsi_module.c" #include "scsi_module.c"
#endif #endif
...@@ -49,7 +49,7 @@ extern void free_irq(unsigned int, void *); ...@@ -49,7 +49,7 @@ extern void free_irq(unsigned int, void *);
/* /*
* Temporary defines for UP kernels, until all code gets fixed. * Temporary defines for UP kernels, until all code gets fixed.
*/ */
#if !CONFIG_SMP #ifndef CONFIG_SMP
# define cli() local_irq_disable() # define cli() local_irq_disable()
# define sti() local_irq_enable() # define sti() local_irq_enable()
# define save_flags(x) local_save_flags(x) # define save_flags(x) local_save_flags(x)
......
...@@ -166,6 +166,7 @@ static __inline__ int DQUOT_OFF(struct super_block *sb) ...@@ -166,6 +166,7 @@ static __inline__ int DQUOT_OFF(struct super_block *sb)
*/ */
#define sb_dquot_ops (NULL) #define sb_dquot_ops (NULL)
#define sb_quotactl_ops (NULL) #define sb_quotactl_ops (NULL)
#define sync_dquots_dev(dev,type) (NULL)
#define DQUOT_INIT(inode) do { } while(0) #define DQUOT_INIT(inode) do { } while(0)
#define DQUOT_DROP(inode) do { } while(0) #define DQUOT_DROP(inode) do { } while(0)
#define DQUOT_ALLOC_INODE(inode) (0) #define DQUOT_ALLOC_INODE(inode) (0)
......
...@@ -467,7 +467,7 @@ do { if (atomic_dec_and_test(&(tsk)->usage)) __put_task_struct(tsk); } while(0) ...@@ -467,7 +467,7 @@ do { if (atomic_dec_and_test(&(tsk)->usage)) __put_task_struct(tsk); } while(0)
#define PF_KSWAPD 0x00040000 /* I am kswapd */ #define PF_KSWAPD 0x00040000 /* I am kswapd */
#define PF_SWAPOFF 0x00080000 /* I am in swapoff */ #define PF_SWAPOFF 0x00080000 /* I am in swapoff */
#if CONFIG_SMP #ifdef CONFIG_SMP
extern void set_cpus_allowed(task_t *p, unsigned long new_mask); extern void set_cpus_allowed(task_t *p, unsigned long new_mask);
#else #else
# define set_cpus_allowed(p, new_mask) do { } while (0) # define set_cpus_allowed(p, new_mask) do { } while (0)
......
...@@ -65,7 +65,7 @@ extern void add_timer_on(struct timer_list *timer, int cpu); ...@@ -65,7 +65,7 @@ extern void add_timer_on(struct timer_list *timer, int cpu);
extern int del_timer(struct timer_list * timer); extern int del_timer(struct timer_list * timer);
extern int mod_timer(struct timer_list *timer, unsigned long expires); extern int mod_timer(struct timer_list *timer, unsigned long expires);
#if CONFIG_SMP #ifdef CONFIG_SMP
extern int del_timer_sync(struct timer_list * timer); extern int del_timer_sync(struct timer_list * timer);
#else #else
# define del_timer_sync(t) del_timer(t) # define del_timer_sync(t) del_timer(t)
......
...@@ -206,7 +206,7 @@ ...@@ -206,7 +206,7 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/dma.h> #include <asm/dma.h>
#if defined CONFIG_ALPHA_NAUTILUS || CONFIG_ALPHA_GENERIC #if defined(CONFIG_ALPHA_NAUTILUS) || defined(CONFIG_ALPHA_GENERIC)
#include <asm/hwrpb.h> #include <asm/hwrpb.h>
#endif #endif
...@@ -4284,7 +4284,7 @@ static int __init trident_probe(struct pci_dev *pci_dev, const struct pci_device ...@@ -4284,7 +4284,7 @@ static int __init trident_probe(struct pci_dev *pci_dev, const struct pci_device
if(card->revision == ALI_5451_V02) if(card->revision == ALI_5451_V02)
ali_close_multi_channels(); ali_close_multi_channels();
/* edited by HMSEO for GT sound */ /* edited by HMSEO for GT sound */
#if defined CONFIG_ALPHA_NAUTILUS || CONFIG_ALPHA_GENERIC #if defined(CONFIG_ALPHA_NAUTILUS) || defined(CONFIG_ALPHA_GENERIC)
{ {
u16 ac97_data; u16 ac97_data;
extern struct hwrpb_struct *hwrpb; extern struct hwrpb_struct *hwrpb;
......
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