summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2015-03-30 21:04:45 +0200
committerMark Brown <broonie@kernel.org>2015-04-01 21:27:33 +0100
commitab87ce1d9bb0501fccfc00d5e5ce7c16cd2bcc3e (patch)
treeae434da90612e2bf9beda6b2c6abfc9994a6e9b7
parentc517d838eb7d07bbe9507871fab3931deccff539 (diff)
downloadlinux-ab87ce1d9bb0501fccfc00d5e5ce7c16cd2bcc3e.tar.bz2
ASoC: wm8971: Use system_power_efficient_wq instead of custom workqueue
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> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/codecs/wm8971.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/sound/soc/codecs/wm8971.c b/sound/soc/codecs/wm8971.c
index 39ddb9b8834c..44baacd33252 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;
}