X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fscsi%2Finitio.c;h=0cc7f65b584ff4b84575da41ab307532b823f370;hb=9464c7cf61b9433057924c36e6e02f303a00e768;hp=9e10dac61cfd2857dbd3560320f737694e9cafe8;hpb=41689045f6a3cbe0550e1d34e9cc20d2e8c432ba;p=linux-2.6.git diff --git a/drivers/scsi/initio.c b/drivers/scsi/initio.c index 9e10dac61..0cc7f65b5 100644 --- a/drivers/scsi/initio.c +++ b/drivers/scsi/initio.c @@ -118,6 +118,7 @@ #include #include #include +#include #include #include #include @@ -153,6 +154,7 @@ static unsigned int i91u_debug = DEBUG_DEFAULT; #endif +#define TULSZ(sz) (sizeof(sz) / sizeof(sz[0])) #define TUL_RDWORD(x,y) (short)(inl((int)((ULONG)((ULONG)x+(UCHAR)y)) )) typedef struct PCI_ID_Struc { @@ -2769,7 +2771,7 @@ static int tul_NewReturnNumberOfAdapters(void) init_i91uAdapter_table(); - for (i = 0; i < ARRAY_SIZE(i91u_pci_devices); i++) + for (i = 0; i < TULSZ(i91u_pci_devices); i++) { while ((pDev = pci_find_device(i91u_pci_devices[i].vendor_id, i91u_pci_devices[i].device_id, pDev)) != NULL) { if (pci_enable_device(pDev)) @@ -2867,7 +2869,7 @@ static int i91u_detect(struct scsi_host_template * tpnt) hreg->sg_tablesize = TOTAL_SG_ENTRY; /* Maximun support is 32 */ /* Initial tulip chip */ - ok = request_irq(pHCB->HCS_Intr, i91u_intr, IRQF_DISABLED | IRQF_SHARED, "i91u", hreg); + ok = request_irq(pHCB->HCS_Intr, i91u_intr, SA_INTERRUPT | SA_SHIRQ, "i91u", hreg); if (ok < 0) { printk(KERN_WARNING "i91u: unable to request IRQ %d\n\n", pHCB->HCS_Intr); return 0;