diff options
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r-- | sound/soc/codecs/wm8350.c | 9 | ||||
-rw-r--r-- | sound/soc/codecs/wm8753.c | 21 |
2 files changed, 2 insertions, 28 deletions
diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c index dc6912e9b667..f8a8a6944e65 100644 --- a/sound/soc/codecs/wm8350.c +++ b/sound/soc/codecs/wm8350.c | |||
@@ -1627,7 +1627,6 @@ static int wm8350_codec_remove(struct snd_soc_codec *codec) | |||
1627 | { | 1627 | { |
1628 | struct wm8350_data *priv = snd_soc_codec_get_drvdata(codec); | 1628 | struct wm8350_data *priv = snd_soc_codec_get_drvdata(codec); |
1629 | struct wm8350 *wm8350 = dev_get_platdata(codec->dev); | 1629 | struct wm8350 *wm8350 = dev_get_platdata(codec->dev); |
1630 | int ret; | ||
1631 | 1630 | ||
1632 | wm8350_clear_bits(wm8350, WM8350_JACK_DETECT, | 1631 | wm8350_clear_bits(wm8350, WM8350_JACK_DETECT, |
1633 | WM8350_JDL_ENA | WM8350_JDR_ENA); | 1632 | WM8350_JDL_ENA | WM8350_JDR_ENA); |
@@ -1642,15 +1641,9 @@ static int wm8350_codec_remove(struct snd_soc_codec *codec) | |||
1642 | priv->hpr.jack = NULL; | 1641 | priv->hpr.jack = NULL; |
1643 | priv->mic.jack = NULL; | 1642 | priv->mic.jack = NULL; |
1644 | 1643 | ||
1645 | /* cancel any work waiting to be queued. */ | ||
1646 | ret = cancel_delayed_work(&codec->dapm.delayed_work); | ||
1647 | |||
1648 | /* if there was any work waiting then we run it now and | 1644 | /* if there was any work waiting then we run it now and |
1649 | * wait for its completion */ | 1645 | * wait for its completion */ |
1650 | if (ret) { | 1646 | flush_delayed_work_sync(&codec->delayed_work); |
1651 | schedule_delayed_work(&codec->dapm.delayed_work, 0); | ||
1652 | flush_scheduled_work(); | ||
1653 | } | ||
1654 | 1647 | ||
1655 | wm8350_set_bias_level(codec, SND_SOC_BIAS_OFF); | 1648 | wm8350_set_bias_level(codec, SND_SOC_BIAS_OFF); |
1656 | 1649 | ||
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 | */ | ||
1534 | static 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 | |||
1550 | static int wm8753_probe(struct snd_soc_codec *codec) | 1531 | static 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 */ |
1607 | static int wm8753_remove(struct snd_soc_codec *codec) | 1588 | static 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; |