aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8753.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/wm8753.c')
-rw-r--r--sound/soc/codecs/wm8753.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c
index 57bf9468d39a..747457193887 100644
--- a/sound/soc/codecs/wm8753.c
+++ b/sound/soc/codecs/wm8753.c
@@ -1528,25 +1528,6 @@ static int wm8753_resume(struct snd_soc_codec *codec)
1528 return 0; 1528 return 0;
1529} 1529}
1530 1530
1531/*
1532 * This function forces any delayed work to be queued and run.
1533 */
1534static int run_delayed_work(struct delayed_work *dwork)
1535{
1536 int ret;
1537
1538 /* cancel any work waiting to be queued. */
1539 ret = cancel_delayed_work(dwork);
1540
1541 /* if there was any work waiting then we run it now and
1542 * wait for it's completion */
1543 if (ret) {
1544 schedule_delayed_work(dwork, 0);
1545 flush_scheduled_work();
1546 }
1547 return ret;
1548}
1549
1550static int wm8753_probe(struct snd_soc_codec *codec) 1531static int wm8753_probe(struct snd_soc_codec *codec)
1551{ 1532{
1552 struct wm8753_priv *wm8753 = snd_soc_codec_get_drvdata(codec); 1533 struct wm8753_priv *wm8753 = snd_soc_codec_get_drvdata(codec);
@@ -1606,7 +1587,7 @@ static int wm8753_probe(struct snd_soc_codec *codec)
1606/* power down chip */ 1587/* power down chip */
1607static int wm8753_remove(struct snd_soc_codec *codec) 1588static int wm8753_remove(struct snd_soc_codec *codec)
1608{ 1589{
1609 run_delayed_work(&codec->dapm.delayed_work); 1590 flush_delayed_work_sync(&codec->delayed_work);
1610 wm8753_set_bias_level(codec, SND_SOC_BIAS_OFF); 1591 wm8753_set_bias_level(codec, SND_SOC_BIAS_OFF);
1611 1592
1612 return 0; 1593 return 0;