]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] sound/oss/maestro.c
authorSamuel Thibault <samuel.thibault@ens-lyon.fr>
Sun, 30 Jun 2002 08:37:40 +0000 (01:37 -0700)
committerPetr Vandrovec <vandrove@vc.cvut.cz>
Sun, 30 Jun 2002 08:37:40 +0000 (01:37 -0700)
Disable volume control irq on maestro module unload.

sound/oss/maestro.c

index 3260985c913d97017598fe519777aa6721992e5f..3a38b3681f6bb0b82bd931c86b7fca5b25ab37ef 100644 (file)
@@ -3573,9 +3573,18 @@ maestro_probe(struct pci_dev *pcidev,const struct pci_device_id *pdid)
 static void maestro_remove(struct pci_dev *pcidev) {
        struct ess_card *card = pci_get_drvdata(pcidev);
        int i;
+       u32 n;
        
        /* XXX maybe should force stop bob, but should be all 
                stopped by _release by now */
+
+       /* Turn off hardware volume control interrupt.
+          This has to come before we leave the IRQ below,
+          or a crash results if a button is pressed ! */
+       n = inw(card->iobase+0x18);
+       n&=~(1<<6);
+       outw(n, card->iobase+0x18);
+
        free_irq(card->irq, card);
        unregister_sound_mixer(card->dev_mixer);
        for(i=0;i<NR_DSPS;i++)