]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/pci/au88x0/au88x0.c
Merge git://git.infradead.org/mtd-2.6
[linux-2.6-omap-h63xx.git] / sound / pci / au88x0 / au88x0.c
index 5ec1b6fcd548e2623fd1b023dfe570cfbacd94e0..a36d4d1fd419f098e3dabdfa598914d49d92b378 100644 (file)
@@ -126,7 +126,6 @@ static int snd_vortex_dev_free(struct snd_device *device)
        vortex_gameport_unregister(vortex);
        vortex_core_shutdown(vortex);
        // Take down PCI interface.
-       synchronize_irq(vortex->irq);
        free_irq(vortex->irq, vortex);
        iounmap(vortex->mmio);
        pci_release_regions(vortex->pci_dev);
@@ -181,8 +180,7 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip)
        if ((err = pci_request_regions(pci, CARD_NAME_SHORT)) != 0)
                goto regions_out;
 
-       chip->mmio = ioremap_nocache(pci_resource_start(pci, 0),
-                                    pci_resource_len(pci, 0));
+       chip->mmio = pci_ioremap_bar(pci, 0);
        if (!chip->mmio) {
                printk(KERN_ERR "MMIO area remap failed.\n");
                err = -ENOMEM;
@@ -191,7 +189,7 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip)
 
        /* Init audio core.
         * This must be done before we do request_irq otherwise we can get spurious
-        * interupts that we do not handle properly and make a mess of things */
+        * interrupts that we do not handle properly and make a mess of things */
        if ((err = vortex_core_init(chip)) != 0) {
                printk(KERN_ERR "hw core init failed\n");
                goto core_out;
@@ -220,7 +218,6 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip)
        return 0;
 
       alloc_out:
-       synchronize_irq(chip->irq);
        free_irq(chip->irq, chip);
       irq_out:
        vortex_core_shutdown(chip);
@@ -232,6 +229,7 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip)
        pci_disable_device(chip->pci_dev);
        //FIXME: this not the right place to unregister the gameport
        vortex_gameport_unregister(chip);
+       kfree(chip);
        return err;
 }