aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sun3_scsi_vme.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2007-11-11 19:52:05 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2007-11-25 05:19:26 -0500
commit1e641664301744f0d381de43ae1e12343e60b479 (patch)
tree974c977e1dd9787c943d16b771372f08b48f346d /drivers/scsi/sun3_scsi_vme.c
parent86e8dfc5603ed76917eed0a9dd9e85a1e1a8b162 (diff)
[SCSI] NCR5380: Fix bugs and canonicalize irq handler usage
* Always pass the same value to free_irq() that we pass to request_irq(). This fixes several bugs. * Always call NCR5380_intr() with 'irq' and 'dev_id' arguments. Note, scsi_falcon_intr() is the only case now where dev_id is not the scsi_host. * Always pass Scsi_Host to request_irq(). For most cases, the drivers already did so, and I merely neated the source code line. In other cases, either NULL or a non-sensical value was passed, verified to be unused, then changed to be Scsi_Host in anticipation of the future. In addition to the bugs fixes, this change makes the interface usage consistent, which in turn enables the possibility of directly referencing Scsi_Host from all NCR5380_intr() invocations. Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/sun3_scsi_vme.c')
-rw-r--r--drivers/scsi/sun3_scsi_vme.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/sun3_scsi_vme.c b/drivers/scsi/sun3_scsi_vme.c
index 7cb4a31453e6..02d9727f017a 100644
--- a/drivers/scsi/sun3_scsi_vme.c
+++ b/drivers/scsi/sun3_scsi_vme.c
@@ -230,7 +230,7 @@ static int sun3scsi_detect(struct scsi_host_template * tpnt)
230 ((struct NCR5380_hostdata *)instance->hostdata)->ctrl = 0; 230 ((struct NCR5380_hostdata *)instance->hostdata)->ctrl = 0;
231 231
232 if (request_irq(instance->irq, scsi_sun3_intr, 232 if (request_irq(instance->irq, scsi_sun3_intr,
233 0, "Sun3SCSI-5380VME", NULL)) { 233 0, "Sun3SCSI-5380VME", instance)) {
234#ifndef REAL_DMA 234#ifndef REAL_DMA
235 printk("scsi%d: IRQ%d not free, interrupts disabled\n", 235 printk("scsi%d: IRQ%d not free, interrupts disabled\n",
236 instance->host_no, instance->irq); 236 instance->host_no, instance->irq);
@@ -279,7 +279,7 @@ static int sun3scsi_detect(struct scsi_host_template * tpnt)
279int sun3scsi_release (struct Scsi_Host *shpnt) 279int sun3scsi_release (struct Scsi_Host *shpnt)
280{ 280{
281 if (shpnt->irq != SCSI_IRQ_NONE) 281 if (shpnt->irq != SCSI_IRQ_NONE)
282 free_irq (shpnt->irq, NULL); 282 free_irq(shpnt->irq, shpnt);
283 283
284 iounmap((void *)sun3_scsi_regp); 284 iounmap((void *)sun3_scsi_regp);
285 285