summaryrefslogtreecommitdiff
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2006-12-19 17:16:14 +0100
committerJaroslav Kysela <perex@suse.cz>2007-02-09 09:02:42 +0100
commit4bb09523de50dcf1afc5d3099b9da0381f01b04c (patch)
tree55ccea8c60314591c829b7af7483c58fd6d67d53 /sound/soc/soc-core.c
parent4014c38bd94156c10986a11d890bdae99437dc9a (diff)
[ALSA] soc - Use global workqueue
Use global workqueue for simplicity instead of own workqueue in SoC core and wm8750 codes. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 9f23901fc85c..cf84d8251715 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -59,7 +59,6 @@
static DEFINE_MUTEX(pcm_mutex);
static DEFINE_MUTEX(io_mutex);
-static struct workqueue_struct *soc_workq;
static DECLARE_WAIT_QUEUE_HEAD(soc_pm_waitq);
/* supported sample rates */
@@ -810,7 +809,7 @@ static int soc_codec_close(struct snd_pcm_substream *substream)
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
/* start delayed pop wq here for playback streams */
rtd->codec_dai->pop_wait = 1;
- queue_delayed_work(soc_workq, &socdev->delayed_work,
+ schedule_delayed_work(&socdev->delayed_work,
msecs_to_jiffies(pmdown_time));
} else {
/* capture streams can be powered down now */
@@ -1102,7 +1101,7 @@ static int soc_suspend(struct platform_device *pdev, pm_message_t state)
}
/* close any waiting streams and save state */
- flush_workqueue(soc_workq);
+ flush_scheduled_work();
codec->suspend_dapm_state = codec->dapm_state;
for(i = 0; i < codec->num_dai; i++) {
@@ -1227,16 +1226,9 @@ static int soc_probe(struct platform_device *pdev)
}
/* DAPM stream work */
- soc_workq = create_workqueue("kdapm");
- if (soc_workq == NULL)
- goto work_err;
INIT_DELAYED_WORK(&socdev->delayed_work, close_delayed_work);
return 0;
-work_err:
- if (platform->remove)
- platform->remove(pdev);
-
platform_err:
if (codec_dev->remove)
codec_dev->remove(pdev);
@@ -1263,9 +1255,6 @@ static int soc_remove(struct platform_device *pdev)
struct snd_soc_platform *platform = socdev->platform;
struct snd_soc_codec_device *codec_dev = socdev->codec_dev;
- if (soc_workq)
- destroy_workqueue(soc_workq);
-
if (platform->remove)
platform->remove(pdev);