Merge branch 'topic/workq-update' into topic/misc
[firefly-linux-kernel-4.4.55.git] / sound / pci / oxygen / oxygen_lib.c
index 3078ed66ad6197abede08cfc255688944ee81a3f..c44c91e6fb1883106be61d740f48e0a6dcf5e69b 100644 (file)
@@ -565,7 +565,8 @@ static void oxygen_card_free(struct snd_card *card)
        oxygen_shutdown(chip);
        if (chip->irq >= 0)
                free_irq(chip->irq, chip);
-       flush_scheduled_work();
+       flush_work_sync(&chip->spdif_input_bits_work);
+       flush_work_sync(&chip->gpio_work);
        chip->model.cleanup(chip);
        kfree(chip->model_data);
        mutex_destroy(&chip->mutex);
@@ -741,7 +742,8 @@ int oxygen_pci_suspend(struct pci_dev *pci, pm_message_t state)
        spin_unlock_irq(&chip->reg_lock);
 
        synchronize_irq(chip->irq);
-       flush_scheduled_work();
+       flush_work_sync(&chip->spdif_input_bits_work);
+       flush_work_sync(&chip->gpio_work);
        chip->interrupt_mask = saved_interrupt_mask;
 
        pci_disable_device(pci);