X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=drivers%2Fscsi%2Ft128.c;h=041eaaace2c308a42ce1c6abba9b8dd89992b3a7;hb=42a10add852e6291a7544afd8a286622a3e6ae76;hp=6dc2897672a127822954853dfb32a792ce7a039f;hpb=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2;p=safe%2Fjmp%2Flinux-2.6 diff --git a/drivers/scsi/t128.c b/drivers/scsi/t128.c index 6dc2897..041eaaa 100644 --- a/drivers/scsi/t128.c +++ b/drivers/scsi/t128.c @@ -108,8 +108,7 @@ #include #include -#include -#include +#include #include #include #include @@ -126,15 +125,15 @@ static struct override { unsigned long address; int irq; -} overrides +} overrides #ifdef T128_OVERRIDE [] __initdata = T128_OVERRIDE; #else - [4] __initdata = {{0, IRQ_AUTO}, {0, IRQ_AUTO}, + [4] __initdata = {{0, IRQ_AUTO}, {0, IRQ_AUTO}, {0 ,IRQ_AUTO}, {0, IRQ_AUTO}}; #endif -#define NO_OVERRIDES (sizeof(overrides) / sizeof(struct override)) +#define NO_OVERRIDES ARRAY_SIZE(overrides) static struct base { unsigned int address; @@ -143,7 +142,7 @@ static struct base { { 0xcc000, 0}, { 0xc8000, 0}, { 0xdc000, 0}, { 0xd8000, 0} }; -#define NO_BASES (sizeof (bases) / sizeof (struct base)) +#define NO_BASES ARRAY_SIZE(bases) static struct signature { const char *string; @@ -152,7 +151,7 @@ static struct signature { {"TSROM: SCSI BIOS, Version 1.12", 0x36}, }; -#define NO_SIGNATURES (sizeof (signatures) / sizeof (struct signature)) +#define NO_SIGNATURES ARRAY_SIZE(signatures) /* * Function : t128_setup(char *str, int *ints) @@ -183,7 +182,7 @@ void __init t128_setup(char *str, int *ints){ } /* - * Function : int t128_detect(Scsi_Host_Template * tpnt) + * Function : int t128_detect(struct scsi_host_template * tpnt) * * Purpose : detects and initializes T128,T128F, or T228 controllers * that were autoprobed, overridden on the LILO command line, @@ -195,7 +194,7 @@ void __init t128_setup(char *str, int *ints){ * */ -int __init t128_detect(Scsi_Host_Template * tpnt){ +int __init t128_detect(struct scsi_host_template * tpnt){ static int current_override = 0, current_base = 0; struct Scsi_Host *instance; unsigned long base; @@ -260,7 +259,8 @@ found: instance->irq = NCR5380_probe_irq(instance, T128_IRQS); if (instance->irq != SCSI_IRQ_NONE) - if (request_irq(instance->irq, t128_intr, SA_INTERRUPT, "t128", instance)) { + if (request_irq(instance->irq, t128_intr, IRQF_DISABLED, "t128", + instance)) { printk("scsi%d : IRQ%d not free, interrupts disabled\n", instance->host_no, instance->irq); instance->irq = SCSI_IRQ_NONE; @@ -296,7 +296,7 @@ static int t128_release(struct Scsi_Host *shost) NCR5380_local_declare(); NCR5380_setup(shost); if (shost->irq) - free_irq(shost->irq, NULL); + free_irq(shost->irq, shost); NCR5380_exit(shost); if (shost->io_port && shost->n_io_port) release_region(shost->io_port, shost->n_io_port); @@ -430,15 +430,13 @@ MODULE_LICENSE("GPL"); #include "NCR5380.c" -static Scsi_Host_Template driver_template = { +static struct scsi_host_template driver_template = { .name = "Trantor T128/T128F/T228", .detect = t128_detect, .release = t128_release, .queuecommand = t128_queue_command, .eh_abort_handler = t128_abort, .eh_bus_reset_handler = t128_bus_reset, - .eh_host_reset_handler = t128_host_reset, - .eh_device_reset_handler = t128_device_reset, .bios_param = t128_biosparam, .can_queue = CAN_QUEUE, .this_id = 7,