aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bvme6000_scsi.c
diff options
context:
space:
mode:
authorMatthew Wilcox <matthew@wil.cx>2007-07-17 15:38:03 -0400
committerJames Bottomley <jejb@mulgrave.localdomain>2007-07-18 12:17:57 -0400
commit3ac709c113daa19e375e8b0fef318fab1713f687 (patch)
tree210b4b746f02197ac8c48dbcd424cbc716a7ae22 /drivers/scsi/bvme6000_scsi.c
parent88e2f98e1b3eb27ae708daa3b37dd50f3f06c952 (diff)
[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/bvme6000_scsi.c')
-rw-r--r--drivers/scsi/bvme6000_scsi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/bvme6000_scsi.c b/drivers/scsi/bvme6000_scsi.c
index 012cdea7946d..cac354086737 100644
--- a/drivers/scsi/bvme6000_scsi.c
+++ b/drivers/scsi/bvme6000_scsi.c
@@ -74,6 +74,7 @@ bvme6000_probe(struct device *dev)
74 goto out_put_host; 74 goto out_put_host;
75 } 75 }
76 76
77 dev_set_drvdata(dev, host);
77 scsi_scan_host(host); 78 scsi_scan_host(host);
78 79
79 return 0; 80 return 0;
@@ -89,7 +90,7 @@ bvme6000_probe(struct device *dev)
89static __devexit int 90static __devexit int
90bvme6000_device_remove(struct device *dev) 91bvme6000_device_remove(struct device *dev)
91{ 92{
92 struct Scsi_Host *host = dev_to_shost(dev); 93 struct Scsi_Host *host = dev_get_drvdata(dev);
93 struct NCR_700_Host_Parameters *hostdata = shost_priv(host); 94 struct NCR_700_Host_Parameters *hostdata = shost_priv(host);
94 95
95 scsi_remove_host(host); 96 scsi_remove_host(host);