X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=drivers%2Fscsi%2Fpas16.c;h=f2018b46f4948950ee310cc15b70b55205e00cbd;hb=e854df613fe934c94a0b39eccb4104e72ccbbded;hp=363e0ebd4a390753de9de4e599c6d26c19dda3b4;hpb=3471c288036bf0835a82d0b1bbce2002f6e68390;p=safe%2Fjmp%2Flinux-2.6 diff --git a/drivers/scsi/pas16.c b/drivers/scsi/pas16.c index 363e0eb..f2018b4 100644 --- a/drivers/scsi/pas16.c +++ b/drivers/scsi/pas16.c @@ -2,6 +2,7 @@ #define PSEUDO_DMA #define FOO #define UNSAFE /* Not unsafe for PAS16 -- use it */ +#define PDEBUG 0 /* * This driver adapted from Drew Eckhardt's Trantor T128 driver @@ -115,7 +116,6 @@ #include #include #include -#include #include #include #include @@ -155,7 +155,7 @@ static int default_irqs[] __initdata = static struct override { unsigned short io_port; int irq; -} overrides +} overrides #ifdef PAS16_OVERRIDE [] __initdata = PAS16_OVERRIDE; #else @@ -163,19 +163,19 @@ static struct override { {0,IRQ_AUTO}}; #endif -#define NO_OVERRIDES (sizeof(overrides) / sizeof(struct override)) +#define NO_OVERRIDES ARRAY_SIZE(overrides) static struct base { unsigned short io_port; int noauto; -} bases[] __initdata = +} bases[] __initdata = { {PAS16_DEFAULT_BASE_1, 0}, {PAS16_DEFAULT_BASE_2, 0}, {PAS16_DEFAULT_BASE_3, 0}, {PAS16_DEFAULT_BASE_4, 0} }; -#define NO_BASES (sizeof (bases) / sizeof (struct base)) +#define NO_BASES ARRAY_SIZE(bases) static const unsigned short pas16_offset[ 8 ] = { @@ -368,7 +368,7 @@ void __init pas16_setup(char *str, int *ints) } /* - * Function : int pas16_detect(Scsi_Host_Template * tpnt) + * Function : int pas16_detect(struct scsi_host_template * tpnt) * * Purpose : detects and initializes PAS16 controllers * that were autoprobed, overridden on the LILO command line, @@ -380,7 +380,7 @@ void __init pas16_setup(char *str, int *ints) * */ -int __init pas16_detect(Scsi_Host_Template * tpnt) +int __init pas16_detect(struct scsi_host_template * tpnt) { static int current_override = 0; static unsigned short current_base = 0; @@ -453,7 +453,8 @@ int __init pas16_detect(Scsi_Host_Template * tpnt) instance->irq = NCR5380_probe_irq(instance, PAS16_IRQS); if (instance->irq != SCSI_IRQ_NONE) - if (request_irq(instance->irq, pas16_intr, SA_INTERRUPT, "pas16", instance)) { + if (request_irq(instance->irq, pas16_intr, IRQF_DISABLED, + "pas16", instance)) { printk("scsi%d : IRQ%d not free, interrupts disabled\n", instance->host_no, instance->irq); instance->irq = SCSI_IRQ_NONE; @@ -604,7 +605,7 @@ static inline int NCR5380_pwrite (struct Scsi_Host *instance, unsigned char *src static int pas16_release(struct Scsi_Host *shost) { if (shost->irq) - free_irq(shost->irq, NULL); + free_irq(shost->irq, shost); NCR5380_exit(shost); if (shost->dma_channel != 0xff) free_dma(shost->dma_channel); @@ -614,7 +615,7 @@ static int pas16_release(struct Scsi_Host *shost) return 0; } -static Scsi_Host_Template driver_template = { +static struct scsi_host_template driver_template = { .name = "Pro Audio Spectrum-16 SCSI", .detect = pas16_detect, .release = pas16_release,