All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/8] ASoC: wm8971: Use system_power_efficient_wq instead of custom workqueue
@ 2015-03-30 19:04 Lars-Peter Clausen
  2015-03-30 19:04 ` [PATCH 2/8] ASoC: wm8971: Integrate capacitor charging into the DAPM sequence Lars-Peter Clausen
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Lars-Peter Clausen @ 2015-03-30 19:04 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Charles Keepax, patches, alsa-devel, Lars-Peter Clausen

The delayed work used by the wm8971 driver to manage the caps charging
doesn't have any special requirements that would justify using a custom
workqueue, just use the generic system_power_efficient_wq instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/codecs/wm8971.c | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/sound/soc/codecs/wm8971.c b/sound/soc/codecs/wm8971.c
index 39ddb9b..44baacd 100644
--- a/sound/soc/codecs/wm8971.c
+++ b/sound/soc/codecs/wm8971.c
@@ -31,8 +31,6 @@
 
 #define	WM8971_REG_COUNT		43
 
-static struct workqueue_struct *wm8971_workq = NULL;
-
 /* codec private data */
 struct wm8971_priv {
 	unsigned int sysclk;
@@ -636,7 +634,8 @@ static int wm8971_resume(struct snd_soc_codec *codec)
 		reg = snd_soc_read(codec, WM8971_PWR1) & 0xfe3e;
 		snd_soc_write(codec, WM8971_PWR1, reg | 0x01c0);
 		codec->dapm.bias_level = SND_SOC_BIAS_ON;
-		queue_delayed_work(wm8971_workq, &codec->dapm.delayed_work,
+		queue_delayed_work(system_power_efficient_wq,
+			&codec->dapm.delayed_work,
 			msecs_to_jiffies(1000));
 	}
 
@@ -649,9 +648,6 @@ static int wm8971_probe(struct snd_soc_codec *codec)
 	u16 reg;
 
 	INIT_DELAYED_WORK(&codec->dapm.delayed_work, wm8971_work);
-	wm8971_workq = create_workqueue("wm8971");
-	if (wm8971_workq == NULL)
-		return -ENOMEM;
 
 	wm8971_reset(codec);
 
@@ -659,7 +655,8 @@ static int wm8971_probe(struct snd_soc_codec *codec)
 	reg = snd_soc_read(codec, WM8971_PWR1) & 0xfe3e;
 	snd_soc_write(codec, WM8971_PWR1, reg | 0x01c0);
 	codec->dapm.bias_level = SND_SOC_BIAS_STANDBY;
-	queue_delayed_work(wm8971_workq, &codec->dapm.delayed_work,
+	queue_delayed_work(system_power_efficient_wq,
+		&codec->dapm.delayed_work,
 		msecs_to_jiffies(1000));
 
 	/* set the update bits */
@@ -681,8 +678,6 @@ static int wm8971_remove(struct snd_soc_codec *codec)
 {
 	wm8971_set_bias_level(codec, SND_SOC_BIAS_OFF);
 
-	if (wm8971_workq)
-		destroy_workqueue(wm8971_workq);
 	return 0;
 }
 
-- 
1.8.0

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

end of thread, other threads:[~2015-04-01 20:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-30 19:04 [PATCH 1/8] ASoC: wm8971: Use system_power_efficient_wq instead of custom workqueue Lars-Peter Clausen
2015-03-30 19:04 ` [PATCH 2/8] ASoC: wm8971: Integrate capacitor charging into the DAPM sequence Lars-Peter Clausen
2015-03-30 19:04 ` [PATCH 3/8] ASoC: wm8971: Cleanup manual bias level transitions Lars-Peter Clausen
2015-03-30 19:04 ` [PATCH 4/8] ASoC: wm8753: Integrate capacitor charging into the DAPM sequence Lars-Peter Clausen
2015-03-30 19:04 ` [PATCH 5/8] ASoC: wm8753: Cleanup manual bias level transitions Lars-Peter Clausen
2015-03-30 19:04 ` [PATCH 6/8] ASoC: Remove suspend_bias_level from DAPM context struct Lars-Peter Clausen
2015-03-30 19:04 ` [PATCH 7/8] ASoC: wm8350: Move delayed work struct from DAPM context to driver state Lars-Peter Clausen
2015-03-30 19:04 ` [PATCH 8/8] ASoC: dapm: Remove delayed_work from dapm context struct Lars-Peter Clausen
2015-04-01 11:52 ` [PATCH 1/8] ASoC: wm8971: Use system_power_efficient_wq instead of custom workqueue Charles Keepax
2015-04-01 20:28 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.