summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mvme16x_scsi.c
diff options
context:
space:
mode:
authorMatthew Wilcox <matthew@wil.cx>2007-07-17 21:38:03 +0200
committerJames Bottomley <jejb@mulgrave.localdomain>2007-07-18 18:17:57 +0200
commit3ac709c113daa19e375e8b0fef318fab1713f687 (patch)
tree210b4b746f02197ac8c48dbcd424cbc716a7ae22 /drivers/scsi/mvme16x_scsi.c
parent[SCSI] aacraid: add vpd to inquiry (diff)
downloadlinux-3ac709c113daa19e375e8b0fef318fab1713f687.tar.xz
linux-3ac709c113daa19e375e8b0fef318fab1713f687.zip
[SCSI] a4000t, zorro7xx, mvme16x, bvme6000,sim710: xxx_device_remove seems buggy
Fix drivers misusing dev_to_shost Some drivers were using dev_to_shost to go from a struct device to the corresponding shost. Unfortunately, dev_to_shost only looks up the tree to find an shost (it's designed to go from a scsi_device or a scsi_target to the parent scsi_host), and these drivers were calling it with the parent of the scsi_host. I've fixed this by saving a pointer to the Scsi_Host in the drvdata, which matches what most scsi drivers do. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/mvme16x_scsi.c')
-rw-r--r--drivers/scsi/mvme16x_scsi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/mvme16x_scsi.c b/drivers/scsi/mvme16x_scsi.c
index d6ef22a941c4..1bdddad48571 100644
--- a/drivers/scsi/mvme16x_scsi.c
+++ b/drivers/scsi/mvme16x_scsi.c
@@ -89,6 +89,7 @@ mvme16x_probe(struct device *dev)
out_be32(0xfff4202c, v);
}
+ dev_set_drvdata(dev, host);
scsi_scan_host(host);
return 0;
@@ -104,7 +105,7 @@ mvme16x_probe(struct device *dev)
static __devexit int
mvme16x_device_remove(struct device *dev)
{
- struct Scsi_Host *host = dev_to_shost(dev);
+ struct Scsi_Host *host = dev_get_drvdata(dev);
struct NCR_700_Host_Parameters *hostdata = shost_priv(host);
/* Disable scsi chip ints */