alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: core: init delayed_work for codec-codec links
@ 2013-07-31 13:16 Richard Fitzgerald
  2013-07-31 13:25 ` Mark Brown
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Richard Fitzgerald @ 2013-07-31 13:16 UTC (permalink / raw)
  To: broonie, lgirdwood; +Cc: tiwai, alsa-devel, linux-kernel

If soc_probe_link_dais() finds a codec-codec link it
skips creating a compress or pcm stream and links the
DAIs together. But it must also init the delayed_work
otherwise shutting down the DAI chain will fault when
calling flush_delayed_work_sync() on the linked DAI.

Pointing it to a dummy work callback is cleaner than taking
special cases in the code to bypass the flush_delayed_work_sync().

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
---
 sound/soc/soc-core.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 4489c5b..bbe136c 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -199,6 +199,10 @@ static ssize_t pmdown_time_set(struct device *dev,
 	return count;
 }
 
+static void dummy_delayed_work(struct work_struct *work)
+{
+}
+
 static DEVICE_ATTR(pmdown_time, 0644, pmdown_time_show, pmdown_time_set);
 
 #ifdef CONFIG_DEBUG_FS
@@ -1428,6 +1432,8 @@ static int soc_probe_link_dais(struct snd_soc_card *card, int num, int order)
 				return ret;
 			}
 		} else {
+			INIT_DELAYED_WORK(&rtd->delayed_work, dummy_delayed_work);
+
 			/* link the DAI widgets */
 			play_w = codec_dai->playback_widget;
 			capture_w = cpu_dai->capture_widget;
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-08-05 16:09 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-31 13:16 [PATCH] ASoC: core: init delayed_work for codec-codec links Richard Fitzgerald
2013-07-31 13:25 ` Mark Brown
2013-08-01 15:13   ` Richard Fitzgerald
2013-08-01 15:23     ` Mark Brown
2013-08-01 15:50       ` Richard Fitzgerald
2013-08-01 18:47         ` Mark Brown
2013-08-02 10:01 ` [PATCH v2] " Richard Fitzgerald
2013-08-02 10:14   ` Mark Brown
2013-08-02 10:51 ` [PATCH v3] " Richard Fitzgerald
2013-08-05 10:33   ` [alsa-devel] " Mark Brown
2013-08-05 12:17 ` [PATCH v4] " Richard Fitzgerald
2013-08-05 16:09   ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).