fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / drivers / scsi / aha1740.c
index 4b8c6a5..d7af9c6 100644 (file)
@@ -223,8 +223,7 @@ static int aha1740_test_port(unsigned int base)
 }
 
 /* A "high" level interrupt handler */
-static irqreturn_t aha1740_intr_handle(int irq, void *dev_id,
-                                      struct pt_regs *regs)
+static irqreturn_t aha1740_intr_handle(int irq, void *dev_id)
 {
        struct Scsi_Host *host = (struct Scsi_Host *) dev_id;
         void (*my_done)(Scsi_Cmnd *);
@@ -587,7 +586,7 @@ static struct scsi_host_template aha1740_template = {
 
 static int aha1740_probe (struct device *dev)
 {
-       int slotbase;
+       int slotbase, rc;
        unsigned int irq_level, irq_type, translation;
        struct Scsi_Host *shpnt;
        struct aha1740_hostdata *host;
@@ -634,7 +633,7 @@ static int aha1740_probe (struct device *dev)
        }
        
        DEB(printk("aha1740_probe: enable interrupt channel %d\n",irq_level));
-       if (request_irq(irq_level,aha1740_intr_handle,irq_type ? 0 : SA_SHIRQ,
+       if (request_irq(irq_level,aha1740_intr_handle,irq_type ? 0 : IRQF_SHARED,
                        "aha1740",shpnt)) {
                printk(KERN_ERR "aha1740_probe: Unable to allocate IRQ %d.\n",
                       irq_level);
@@ -642,10 +641,16 @@ static int aha1740_probe (struct device *dev)
        }
 
        eisa_set_drvdata (edev, shpnt);
-       scsi_add_host (shpnt, dev); /* XXX handle failure */
+
+       rc = scsi_add_host (shpnt, dev);
+       if (rc)
+               goto err_irq;
+
        scsi_scan_host (shpnt);
        return 0;
 
+ err_irq:
+       free_irq(irq_level, shpnt);
  err_unmap:
        dma_unmap_single (&edev->dev, host->ecb_dma_addr,
                          sizeof (host->ecb), DMA_BIDIRECTIONAL);
@@ -681,6 +686,7 @@ static struct eisa_device_id aha1740_ids[] = {
        { "ADP0400" },          /* 1744  */
        { "" }
 };
+MODULE_DEVICE_TABLE(eisa, aha1740_ids);
 
 static struct eisa_driver aha1740_driver = {
        .id_table = aha1740_ids,