diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-12-13 03:28:43 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-12-13 03:28:43 -0500 |
commit | 20aeeb356ba2e8daa99b5942c528ae2b3ea28433 (patch) | |
tree | d2cebc7039954851998d592123899f5627def7a9 /sound/soc/soc-core.c | |
parent | 07a9e2b2fbdda631eeff54e4b8ebcaaea71be538 (diff) | |
parent | 5b84ba26a9672e615897234fa5efd3eea2d6b295 (diff) |
Merge branch 'topic/workq-update' into topic/asoc
Conflicts:
sound/soc/codecs/wm8350.c
sound/soc/codecs/wm8753.c
sound/soc/sh/fsi.c
sound/soc/soc-core.c
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r-- | sound/soc/soc-core.c | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index a14a0507bbd0..68edc693a8a5 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -70,25 +70,6 @@ static int pmdown_time = 5000; | |||
70 | module_param(pmdown_time, int, 0); | 70 | module_param(pmdown_time, int, 0); |
71 | MODULE_PARM_DESC(pmdown_time, "DAPM stream powerdown time (msecs)"); | 71 | MODULE_PARM_DESC(pmdown_time, "DAPM stream powerdown time (msecs)"); |
72 | 72 | ||
73 | /* | ||
74 | * This function forces any delayed work to be queued and run. | ||
75 | */ | ||
76 | static int run_delayed_work(struct delayed_work *dwork) | ||
77 | { | ||
78 | int ret; | ||
79 | |||
80 | /* cancel any work waiting to be queued. */ | ||
81 | ret = cancel_delayed_work(dwork); | ||
82 | |||
83 | /* if there was any work waiting then we run it now and | ||
84 | * wait for it's completion */ | ||
85 | if (ret) { | ||
86 | schedule_delayed_work(dwork, 0); | ||
87 | flush_scheduled_work(); | ||
88 | } | ||
89 | return ret; | ||
90 | } | ||
91 | |||
92 | /* codec register dump */ | 73 | /* codec register dump */ |
93 | static ssize_t soc_codec_reg_show(struct snd_soc_codec *codec, char *buf) | 74 | static ssize_t soc_codec_reg_show(struct snd_soc_codec *codec, char *buf) |
94 | { | 75 | { |
@@ -1046,7 +1027,7 @@ static int soc_suspend(struct device *dev) | |||
1046 | 1027 | ||
1047 | /* close any waiting streams and save state */ | 1028 | /* close any waiting streams and save state */ |
1048 | for (i = 0; i < card->num_rtd; i++) { | 1029 | for (i = 0; i < card->num_rtd; i++) { |
1049 | run_delayed_work(&card->rtd[i].delayed_work); | 1030 | flush_delayed_work_sync(&card->rtd[i].delayed_work); |
1050 | card->rtd[i].codec->dapm.suspend_bias_level = card->rtd[i].codec->dapm.bias_level; | 1031 | card->rtd[i].codec->dapm.suspend_bias_level = card->rtd[i].codec->dapm.bias_level; |
1051 | } | 1032 | } |
1052 | 1033 | ||
@@ -1921,7 +1902,7 @@ static int soc_remove(struct platform_device *pdev) | |||
1921 | /* make sure any delayed work runs */ | 1902 | /* make sure any delayed work runs */ |
1922 | for (i = 0; i < card->num_rtd; i++) { | 1903 | for (i = 0; i < card->num_rtd; i++) { |
1923 | struct snd_soc_pcm_runtime *rtd = &card->rtd[i]; | 1904 | struct snd_soc_pcm_runtime *rtd = &card->rtd[i]; |
1924 | run_delayed_work(&rtd->delayed_work); | 1905 | flush_delayed_work_sync(&rtd->delayed_work); |
1925 | } | 1906 | } |
1926 | 1907 | ||
1927 | /* remove auxiliary devices */ | 1908 | /* remove auxiliary devices */ |
@@ -1958,7 +1939,7 @@ static int soc_poweroff(struct device *dev) | |||
1958 | * now, we're shutting down so no imminent restart. */ | 1939 | * now, we're shutting down so no imminent restart. */ |
1959 | for (i = 0; i < card->num_rtd; i++) { | 1940 | for (i = 0; i < card->num_rtd; i++) { |
1960 | struct snd_soc_pcm_runtime *rtd = &card->rtd[i]; | 1941 | struct snd_soc_pcm_runtime *rtd = &card->rtd[i]; |
1961 | run_delayed_work(&rtd->delayed_work); | 1942 | flush_delayed_work_sync(&rtd->delayed_work); |
1962 | } | 1943 | } |
1963 | 1944 | ||
1964 | snd_soc_dapm_shutdown(card); | 1945 | snd_soc_dapm_shutdown(card); |