This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / drivers / scsi / sim710.c
index 3e684c2..841449d 100644 (file)
@@ -127,16 +127,28 @@ sim710_probe_common(struct device *dev, unsigned long base_addr,
        NCR_700_set_io_mapped(hostdata);
 
        /* and register the chip */
-       if((host = NCR_700_detect(&sim710_driver_template, hostdata, dev, irq,
-                                 scsi_id)) == NULL) {
+       if((host = NCR_700_detect(&sim710_driver_template, hostdata)) == NULL) {
                printk(KERN_ERR "sim710: No host detected; card configuration problem?\n");
                goto out_release;
        }
 
+       host->irq = irq;
+       host->this_id = scsi_id;
+
+       if(request_irq(irq, NCR_700_intr, SA_SHIRQ, "sim710", host)) {
+               printk(KERN_ERR "sim710: irq problem with %d, detaching\n",
+                      irq);
+               goto out_unregister;
+       }
+
+       scsi_add_host(host, dev); /* XXX handle failure */
        scsi_scan_host(host);
+       hostdata->dev = dev;
 
        return 0;
 
+ out_unregister:
+       scsi_host_put(host);
  out_release:
        release_region(host->base, 64);
  out_free: