diff options
author | Christoph Hellwig <hch@lst.de> | 2005-06-10 22:14:30 (GMT) |
---|---|---|
committer | James Bottomley <jejb@titanic.(none)> | 2005-06-11 23:43:48 (GMT) |
commit | 3d65692aed727c7fb4105f03795781ace437a84e (patch) | |
tree | adbbd860235025d102a2aeeec130f0687d180d1e /drivers/scsi/aic7xxx/aic7770_osm.c | |
parent | 6bc9dace767f1fffdf975b3398b3c4e37cd5ae18 (diff) | |
download | linux-3d65692aed727c7fb4105f03795781ace437a84e.tar.xz |
[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/aic7770_osm.c')
-rw-r--r-- | drivers/scsi/aic7xxx/aic7770_osm.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/drivers/scsi/aic7xxx/aic7770_osm.c b/drivers/scsi/aic7xxx/aic7770_osm.c index 682ca0b..d0e9b54 100644 --- a/drivers/scsi/aic7xxx/aic7770_osm.c +++ b/drivers/scsi/aic7xxx/aic7770_osm.c @@ -190,25 +190,13 @@ aic7770_eisa_dev_probe(struct device *dev) static int aic7770_eisa_dev_remove(struct device *dev) { - struct ahc_softc *ahc; - u_long l; + struct ahc_softc *ahc = dev_get_drvata(dev); + u_long s; - /* - * We should be able to just perform - * the free directly, but check our - * list for extra sanity. - */ - ahc_list_lock(&l); - ahc = ahc_find_softc((struct ahc_softc *)dev->driver_data); - if (ahc != NULL) { - u_long s; - - ahc_lock(ahc, &s); - ahc_intr_enable(ahc, FALSE); - ahc_unlock(ahc, &s); - ahc_free(ahc); - } - ahc_list_unlock(&l); + ahc_lock(ahc, &s); + ahc_intr_enable(ahc, FALSE); + ahc_unlock(ahc, &s); + ahc_free(ahc); return (0); } |