]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq
[linux-2.6-omap-h63xx.git] / drivers / scsi / aic7xxx / aic7xxx_osm_pci.c
index 3ce77ddc889e8a6a2cefe4f54092bbaf218b65d5..7e42f07a27f3d2879aec66a395f6504afe6a6fb0 100644 (file)
@@ -143,6 +143,9 @@ ahc_linux_pci_dev_remove(struct pci_dev *pdev)
        struct ahc_softc *ahc = pci_get_drvdata(pdev);
        u_long s;
 
+       if (ahc->platform_data && ahc->platform_data->host)
+                       scsi_remove_host(ahc->platform_data->host);
+
        ahc_lock(ahc, &s);
        ahc_intr_enable(ahc, FALSE);
        ahc_unlock(ahc, &s);
@@ -216,6 +219,7 @@ ahc_linux_pci_dev_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
                ahc->flags |= AHC_39BIT_ADDRESSING;
        } else {
                if (dma_set_mask(dev, DMA_32BIT_MASK)) {
+                       ahc_free(ahc);
                        printk(KERN_WARNING "aic7xxx: No suitable DMA available.\n");
                        return (-ENODEV);
                }
@@ -371,7 +375,7 @@ ahc_pci_map_int(struct ahc_softc *ahc)
        int error;
 
        error = request_irq(ahc->dev_softc->irq, ahc_linux_isr,
-                           SA_SHIRQ, "aic7xxx", ahc);
+                           IRQF_SHARED, "aic7xxx", ahc);
        if (error == 0)
                ahc->platform_data->irq = ahc->dev_softc->irq;