X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fscsi%2Ffdomain.c;h=b0694dcce246e435c3936f3a7a0b37509f39effb;hb=c1b45f247a2901de3982f33196d5caf8ca5b9799;hp=3b2a5bf5c43e7fc367aadc96618ef77df6c441b6;hpb=31151ba2cef171344beac254e65bd7e00138bb0d;p=linux-2.6-omap-h63xx.git diff --git a/drivers/scsi/fdomain.c b/drivers/scsi/fdomain.c index 3b2a5bf5c43..b0694dcce24 100644 --- a/drivers/scsi/fdomain.c +++ b/drivers/scsi/fdomain.c @@ -266,7 +266,6 @@ **************************************************************************/ -#include #include #include #include @@ -420,10 +419,10 @@ static unsigned long addresses[] = { 0xd0000, 0xe0000, }; -#define ADDRESS_COUNT (sizeof( addresses ) / sizeof( unsigned )) - +#define ADDRESS_COUNT ARRAY_SIZE(addresses) + static unsigned short ports[] = { 0x140, 0x150, 0x160, 0x170 }; -#define PORT_COUNT (sizeof( ports ) / sizeof( unsigned short )) +#define PORT_COUNT ARRAY_SIZE(ports) static unsigned short ints[] = { 3, 5, 10, 11, 12, 14, 15, 0 }; @@ -502,7 +501,7 @@ static struct signature { geometry location are verified). */ }; -#define SIGNATURE_COUNT (sizeof( signatures ) / sizeof( struct signature )) +#define SIGNATURE_COUNT ARRAY_SIZE(signatures) static void print_banner( struct Scsi_Host *shpnt ) { @@ -519,7 +518,7 @@ static void print_banner( struct Scsi_Host *shpnt ) if (bios_minor >= 0) printk("%d", bios_minor); else printk("?."); - + printk( " at 0x%lx using scsi id %d\n", bios_base, shpnt->this_id ); } @@ -950,7 +949,7 @@ struct Scsi_Host *__fdomain_16x0_detect(struct scsi_host_template *tpnt ) /* Register the IRQ with the kernel */ retcode = request_irq( interrupt_level, - do_fdomain_16x0_intr, pdev?SA_SHIRQ:0, "fdomain", shpnt); + do_fdomain_16x0_intr, pdev?IRQF_SHARED:0, "fdomain", shpnt); if (retcode < 0) { if (retcode == -EINVAL) { @@ -1154,7 +1153,7 @@ static irqreturn_t do_fdomain_16x0_intr(int irq, void *dev_id, outb(0x40 | FIFO_COUNT, port_base + Interrupt_Cntl); outb(0x82, port_base + SCSI_Cntl); /* Bus Enable + Select */ - outb(adapter_mask | (1 << current_SC->device->id), port_base + SCSI_Data_NoACK); + outb(adapter_mask | (1 << scmd_id(current_SC)), port_base + SCSI_Data_NoACK); /* Stop arbitration and enable parity */ outb(0x10 | PARITY_MASK, port_base + TMC_Cntl); @@ -1166,7 +1165,7 @@ static irqreturn_t do_fdomain_16x0_intr(int irq, void *dev_id, status = inb(port_base + SCSI_Status); if (!(status & 0x01)) { /* Try again, for slow devices */ - if (fdomain_select( current_SC->device->id )) { + if (fdomain_select( scmd_id(current_SC) )) { #if EVERY_ACCESS printk( " SFAIL " ); #endif