diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-10-20 00:10:27 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-10-20 00:10:27 -0300 |
commit | d0b2f91bede3bd5e3d24dd6803e56eee959c1797 (patch) | |
tree | 7fee4ab0509879c373c4f2cbd5b8a5be5b4041ee /sound/sh | |
parent | e914f8eb445e8f74b00303c19c2ffceaedd16a05 (diff) |
Linux-libre 4.8.2-gnupck-4.8.2-gnu
Diffstat (limited to 'sound/sh')
-rw-r--r-- | sound/sh/aica.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/sound/sh/aica.c b/sound/sh/aica.c index cad3ee974..7d63617d2 100644 --- a/sound/sh/aica.c +++ b/sound/sh/aica.c @@ -63,9 +63,6 @@ MODULE_PARM_DESC(id, "ID string for " CARD_NAME " soundcard."); module_param(enable, bool, 0644); MODULE_PARM_DESC(enable, "Enable " CARD_NAME " soundcard."); -/* Use workqueue */ -static struct workqueue_struct *aica_queue; - /* Simple platform device */ static struct platform_device *pd; static struct resource aica_memory_space[2] = { @@ -327,7 +324,7 @@ static void aica_period_elapsed(unsigned long timer_var) dreamcastcard->current_period = play_period; if (unlikely(dreamcastcard->dma_check == 0)) dreamcastcard->dma_check = 1; - queue_work(aica_queue, &(dreamcastcard->spu_dma_work)); + schedule_work(&(dreamcastcard->spu_dma_work)); } static void spu_begin_dma(struct snd_pcm_substream *substream) @@ -337,7 +334,7 @@ static void spu_begin_dma(struct snd_pcm_substream *substream) runtime = substream->runtime; dreamcastcard = substream->pcm->private_data; /*get the queue to do the work */ - queue_work(aica_queue, &(dreamcastcard->spu_dma_work)); + schedule_work(&(dreamcastcard->spu_dma_work)); /* Timer may already be running */ if (unlikely(dreamcastcard->timer.data)) { mod_timer(&dreamcastcard->timer, jiffies + 4); @@ -381,7 +378,7 @@ static int snd_aicapcm_pcm_close(struct snd_pcm_substream *substream) { struct snd_card_aica *dreamcastcard = substream->pcm->private_data; - flush_workqueue(aica_queue); + flush_work(&(dreamcastcard->spu_dma_work)); if (dreamcastcard->timer.data) del_timer(&dreamcastcard->timer); kfree(dreamcastcard->channel); @@ -633,9 +630,6 @@ static int snd_aica_probe(struct platform_device *devptr) if (unlikely(err < 0)) goto freedreamcast; platform_set_drvdata(devptr, dreamcastcard); - aica_queue = create_workqueue(CARD_NAME); - if (unlikely(!aica_queue)) - goto freedreamcast; snd_printk ("ALSA Driver for Yamaha AICA Super Intelligent Sound Processor\n"); return 0; @@ -671,10 +665,6 @@ static int __init aica_init(void) static void __exit aica_exit(void) { - /* Destroy the aica kernel thread * - * being extra cautious to check if it exists*/ - if (likely(aica_queue)) - destroy_workqueue(aica_queue); platform_device_unregister(pd); platform_driver_unregister(&snd_aica_driver); /* Kill any sound still playing and reset ARM7 to safe state */ |