aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2005-06-10 18:14:30 -0400
committerJames Bottomley <jejb@titanic.(none)>2005-06-11 19:43:48 -0400
commit3d65692aed727c7fb4105f03795781ace437a84e (patch)
treeadbbd860235025d102a2aeeec130f0687d180d1e /drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
parent6bc9dace767f1fffdf975b3398b3c4e37cd5ae18 (diff)
[SCSI] aic7xxx: remove ahc_find_softc
there's absolutely no reason not to trust the driver private data Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/aic7xxx/aic7xxx_osm_pci.c')
-rw-r--r--drivers/scsi/aic7xxx/aic7xxx_osm_pci.c28
1 files changed, 9 insertions, 19 deletions
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c b/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
index 9cd4fe1c4ef2..89d737ee551a 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
@@ -140,27 +140,17 @@ struct pci_driver aic7xxx_pci_driver = {
140static void 140static void
141ahc_linux_pci_dev_remove(struct pci_dev *pdev) 141ahc_linux_pci_dev_remove(struct pci_dev *pdev)
142{ 142{
143 struct ahc_softc *ahc; 143 struct ahc_softc *ahc = pci_get_drvdata(pdev);
144 u_long l; 144 u_long s;
145 145
146 /* 146 ahc_list_lock(&s);
147 * We should be able to just perform 147 TAILQ_REMOVE(&ahc_tailq, ahc, links);
148 * the free directly, but check our 148 ahc_list_unlock(&s);
149 * list for extra sanity.
150 */
151 ahc_list_lock(&l);
152 ahc = ahc_find_softc((struct ahc_softc *)pci_get_drvdata(pdev));
153 if (ahc != NULL) {
154 u_long s;
155 149
156 TAILQ_REMOVE(&ahc_tailq, ahc, links); 150 ahc_lock(ahc, &s);
157 ahc_list_unlock(&l); 151 ahc_intr_enable(ahc, FALSE);
158 ahc_lock(ahc, &s); 152 ahc_unlock(ahc, &s);
159 ahc_intr_enable(ahc, FALSE); 153 ahc_free(ahc);
160 ahc_unlock(ahc, &s);
161 ahc_free(ahc);
162 } else
163 ahc_list_unlock(&l);
164} 154}
165 155
166static int 156static int