]> git.hungrycats.org Git - linux/commitdiff
[PATCH] tmscsim: remove superflous global host list
authorChristoph Hellwig <hch@lst.de>
Tue, 5 Oct 2004 04:49:16 +0000 (23:49 -0500)
committerChristoph Hellwig <hch@lst.de>
Tue, 5 Oct 2004 04:49:16 +0000 (23:49 -0500)
It's only used to "verify" the host pointer in the interrupt handler,
which better had to be correct or else 90% of the drivers would break.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/scsiiom.c
drivers/scsi/tmscsim.c
drivers/scsi/tmscsim.h

index ad6808d85fcfd9fe4f769359b5da0184486b0cb7..e0cf348a875cad40b5786630a1dd7ec9cca93402 100644 (file)
@@ -225,7 +225,7 @@ dc390_InvalidCmd(struct dc390_acb* pACB)
 static irqreturn_t __inline__
 DC390_Interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
-    struct dc390_acb *pACB, *pACB2;
+    struct dc390_acb *pACB = (struct dc390_acb*)dev_id;
     struct dc390_dcb *pDCB;
     struct dc390_srb *pSRB;
     u8  sstatus=0;
@@ -236,14 +236,6 @@ DC390_Interrupt(int irq, void *dev_id, struct pt_regs *regs)
     u8  dstatus;
 #endif
 
-    pACB = (struct dc390_acb*)dev_id;
-    for (pACB2 = dc390_pACB_start; (pACB2 && pACB2 != pACB); pACB2 = pACB2->pNextACB);
-    if (!pACB2)
-    {
-       printk ("DC390: IRQ called with foreign dev_id %p!\n", pACB);
-       return IRQ_NONE;
-    }
-    
     sstatus = DC390_read8 (Scsi_Status);
     if( !(sstatus & INTERRUPT) )
        return IRQ_NONE;
index a8d76456248fca2d7e02ba6d8edb411913db242e..53c9ec3e564600dca9b506ef598f58f10fbfcba7 100644 (file)
@@ -279,8 +279,6 @@ static irqreturn_t do_DC390_Interrupt( int, void *, struct pt_regs *);
 
 static void   dc390_updateDCB (struct dc390_acb* pACB, struct dc390_dcb* pDCB);
 
-static struct dc390_acb*       dc390_pACB_start= NULL;
-static struct dc390_acb*       dc390_pACB_current = NULL;
 static u32     dc390_laststatus = 0;
 static u8      dc390_adapterCnt = 0;
 
@@ -1242,7 +1240,7 @@ static void __devinit dc390_init_hw(struct dc390_acb *pACB, u8 index)
 static int __devinit dc390_probe_one(struct pci_dev *pdev,
                                    const struct pci_device_id *id)
 {
-       struct dc390_acb *pACB, *pACB2;
+       struct dc390_acb *pACB;
        struct Scsi_Host *shost;
        unsigned long io_port;
        int error = -ENODEV, i;
@@ -1334,18 +1332,6 @@ static int __devinit dc390_probe_one(struct pci_dev *pdev,
                goto out_release_region;
        }
 
-       if (!dc390_pACB_start) {
-               pACB2 = NULL;
-               dc390_pACB_start = pACB;
-               dc390_pACB_current = pACB;
-               pACB->pNextACB = NULL;
-       } else {
-               pACB2 = dc390_pACB_current;
-               dc390_pACB_current->pNextACB = pACB;
-               dc390_pACB_current = pACB;
-               pACB->pNextACB = NULL;
-       }
-
        dc390_init_hw(pACB, dc390_adapterCnt);
        
        dc390_adapterCnt++;
index 5cc90e9517a8edd61764445e56e522fbeca6b907..0fa8091903d5c7075ab470f607d250a3c3be6ef2 100644 (file)
@@ -140,7 +140,6 @@ u8          SyncOffset;     /*;for reg. and nego.(low nibble) */
 struct dc390_acb
 {
 struct Scsi_Host *pScsiHost;
-struct dc390_acb       *pNextACB;
 u16            IOPortBase;
 u8             IRQLevel;
 u8             status;