]> err.no Git - linux-2.6/blobdiff - sound/pci/intel8x0.c
[PATCH] jffs2: fix symlink error handling
[linux-2.6] / sound / pci / intel8x0.c
index c3c3b68b45402e03b92a8e716a1785930eedc273..d7af3e47443263810fc075e1b7e9e513c01996fc 100644 (file)
@@ -2376,6 +2376,9 @@ static int intel8x0_suspend(snd_card_t *card, pm_message_t state)
                        snd_ac97_suspend(chip->ac97[i]);
        if (chip->device_type == DEVICE_INTEL_ICH4)
                chip->sdm_saved = igetbyte(chip, ICHREG(SDM));
+
+       if (chip->irq >= 0)
+               free_irq(chip->irq, (void *)chip);
        pci_disable_device(chip->pci);
        return 0;
 }
@@ -2387,7 +2390,9 @@ static int intel8x0_resume(snd_card_t *card)
 
        pci_enable_device(chip->pci);
        pci_set_master(chip->pci);
-       snd_intel8x0_chip_init(chip, 0);
+       request_irq(chip->irq, snd_intel8x0_interrupt, SA_INTERRUPT|SA_SHIRQ, card->shortname, (void *)chip);
+       synchronize_irq(chip->irq);
+       snd_intel8x0_chip_init(chip, 1);
 
        /* re-initialize mixer stuff */
        if (chip->device_type == DEVICE_INTEL_ICH4) {
@@ -2464,8 +2469,7 @@ static void __devinit intel8x0_measure_ac97_clock(intel8x0_t *chip)
        }
        do_gettimeofday(&start_time);
        spin_unlock_irq(&chip->reg_lock);
-       set_current_state(TASK_UNINTERRUPTIBLE);
-       schedule_timeout(HZ / 20);
+       msleep(50);
        spin_lock_irq(&chip->reg_lock);
        /* check the position */
        pos = ichdev->fragsize1;