aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2015-03-30 15:04:45 -0400
committerMark Brown <broonie@kernel.org>2015-04-01 16:27:33 -0400
commitab87ce1d9bb0501fccfc00d5e5ce7c16cd2bcc3e (patch)
treeae434da90612e2bf9beda6b2c6abfc9994a6e9b7
parentc517d838eb7d07bbe9507871fab3931deccff539 (diff)
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 @@
31 31
32#define WM8971_REG_COUNT 43 32#define WM8971_REG_COUNT 43
33 33
34static struct workqueue_struct *wm8971_workq = NULL;
35
36/* codec private data */ 34/* codec private data */
37struct wm8971_priv { 35struct wm8971_priv {
38 unsigned int sysclk; 36 unsigned int sysclk;
@@ -636,7 +634,8 @@ static int wm8971_resume(struct snd_soc_codec *codec)
636 reg = snd_soc_read(codec, WM8971_PWR1) & 0xfe3e; 634 reg = snd_soc_read(codec, WM8971_PWR1) & 0xfe3e;
637 snd_soc_write(codec, WM8971_PWR1, reg | 0x01c0); 635 snd_soc_write(codec, WM8971_PWR1, reg | 0x01c0);
638 codec->dapm.bias_level = SND_SOC_BIAS_ON; 636 codec->dapm.bias_level = SND_SOC_BIAS_ON;
639 queue_delayed_work(wm8971_workq, &codec->dapm.delayed_work, 637 queue_delayed_work(system_power_efficient_wq,
638 &codec->dapm.delayed_work,
640 msecs_to_jiffies(1000)); 639 msecs_to_jiffies(1000));
641 } 640 }
642 641
@@ -649,9 +648,6 @@ static int wm8971_probe(struct snd_soc_codec *codec)
649 u16 reg; 648 u16 reg;
650 649
651 INIT_DELAYED_WORK(&codec->dapm.delayed_work, wm8971_work); 650 INIT_DELAYED_WORK(&codec->dapm.delayed_work, wm8971_work);
652 wm8971_workq = create_workqueue("wm8971");
653 if (wm8971_workq == NULL)
654 return -ENOMEM;
655 651
656 wm8971_reset(codec); 652 wm8971_reset(codec);
657 653
@@ -659,7 +655,8 @@ static int wm8971_probe(struct snd_soc_codec *codec)
659 reg = snd_soc_read(codec, WM8971_PWR1) & 0xfe3e; 655 reg = snd_soc_read(codec, WM8971_PWR1) & 0xfe3e;
660 snd_soc_write(codec, WM8971_PWR1, reg | 0x01c0); 656 snd_soc_write(codec, WM8971_PWR1, reg | 0x01c0);
661 codec->dapm.bias_level = SND_SOC_BIAS_STANDBY; 657 codec->dapm.bias_level = SND_SOC_BIAS_STANDBY;
662 queue_delayed_work(wm8971_workq, &codec->dapm.delayed_work, 658 queue_delayed_work(system_power_efficient_wq,
659 &codec->dapm.delayed_work,
663 msecs_to_jiffies(1000)); 660 msecs_to_jiffies(1000));
664 661
665 /* set the update bits */ 662 /* set the update bits */
@@ -681,8 +678,6 @@ static int wm8971_remove(struct snd_soc_codec *codec)
681{ 678{
682 wm8971_set_bias_level(codec, SND_SOC_BIAS_OFF); 679 wm8971_set_bias_level(codec, SND_SOC_BIAS_OFF);
683 680
684 if (wm8971_workq)
685 destroy_workqueue(wm8971_workq);
686 return 0; 681 return 0;
687} 682}
688 683