diff options
Diffstat (limited to 'sound/x86/intel_hdmi_audio.c')
-rw-r--r-- | sound/x86/intel_hdmi_audio.c | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/sound/x86/intel_hdmi_audio.c b/sound/x86/intel_hdmi_audio.c index 83d76c345940..00c92eb854ce 100644 --- a/sound/x86/intel_hdmi_audio.c +++ b/sound/x86/intel_hdmi_audio.c | |||
@@ -1648,7 +1648,7 @@ static int had_create_jack(struct snd_intelhad *ctx, | |||
1648 | * PM callbacks | 1648 | * PM callbacks |
1649 | */ | 1649 | */ |
1650 | 1650 | ||
1651 | static int hdmi_lpe_audio_runtime_suspend(struct device *dev) | 1651 | static int __maybe_unused hdmi_lpe_audio_suspend(struct device *dev) |
1652 | { | 1652 | { |
1653 | struct snd_intelhad_card *card_ctx = dev_get_drvdata(dev); | 1653 | struct snd_intelhad_card *card_ctx = dev_get_drvdata(dev); |
1654 | int port; | 1654 | int port; |
@@ -1664,23 +1664,8 @@ static int hdmi_lpe_audio_runtime_suspend(struct device *dev) | |||
1664 | } | 1664 | } |
1665 | } | 1665 | } |
1666 | 1666 | ||
1667 | return 0; | 1667 | snd_power_change_state(card_ctx->card, SNDRV_CTL_POWER_D3hot); |
1668 | } | ||
1669 | |||
1670 | static int __maybe_unused hdmi_lpe_audio_suspend(struct device *dev) | ||
1671 | { | ||
1672 | struct snd_intelhad_card *card_ctx = dev_get_drvdata(dev); | ||
1673 | int err; | ||
1674 | 1668 | ||
1675 | err = hdmi_lpe_audio_runtime_suspend(dev); | ||
1676 | if (!err) | ||
1677 | snd_power_change_state(card_ctx->card, SNDRV_CTL_POWER_D3hot); | ||
1678 | return err; | ||
1679 | } | ||
1680 | |||
1681 | static int hdmi_lpe_audio_runtime_resume(struct device *dev) | ||
1682 | { | ||
1683 | pm_runtime_mark_last_busy(dev); | ||
1684 | return 0; | 1669 | return 0; |
1685 | } | 1670 | } |
1686 | 1671 | ||
@@ -1688,8 +1673,10 @@ static int __maybe_unused hdmi_lpe_audio_resume(struct device *dev) | |||
1688 | { | 1673 | { |
1689 | struct snd_intelhad_card *card_ctx = dev_get_drvdata(dev); | 1674 | struct snd_intelhad_card *card_ctx = dev_get_drvdata(dev); |
1690 | 1675 | ||
1691 | hdmi_lpe_audio_runtime_resume(dev); | 1676 | pm_runtime_mark_last_busy(dev); |
1677 | |||
1692 | snd_power_change_state(card_ctx->card, SNDRV_CTL_POWER_D0); | 1678 | snd_power_change_state(card_ctx->card, SNDRV_CTL_POWER_D0); |
1679 | |||
1693 | return 0; | 1680 | return 0; |
1694 | } | 1681 | } |
1695 | 1682 | ||
@@ -1877,7 +1864,6 @@ static int hdmi_lpe_audio_probe(struct platform_device *pdev) | |||
1877 | 1864 | ||
1878 | pm_runtime_use_autosuspend(&pdev->dev); | 1865 | pm_runtime_use_autosuspend(&pdev->dev); |
1879 | pm_runtime_mark_last_busy(&pdev->dev); | 1866 | pm_runtime_mark_last_busy(&pdev->dev); |
1880 | pm_runtime_set_active(&pdev->dev); | ||
1881 | 1867 | ||
1882 | dev_dbg(&pdev->dev, "%s: handle pending notification\n", __func__); | 1868 | dev_dbg(&pdev->dev, "%s: handle pending notification\n", __func__); |
1883 | for_each_port(card_ctx, port) { | 1869 | for_each_port(card_ctx, port) { |
@@ -1908,8 +1894,6 @@ static int hdmi_lpe_audio_remove(struct platform_device *pdev) | |||
1908 | 1894 | ||
1909 | static const struct dev_pm_ops hdmi_lpe_audio_pm = { | 1895 | static const struct dev_pm_ops hdmi_lpe_audio_pm = { |
1910 | SET_SYSTEM_SLEEP_PM_OPS(hdmi_lpe_audio_suspend, hdmi_lpe_audio_resume) | 1896 | SET_SYSTEM_SLEEP_PM_OPS(hdmi_lpe_audio_suspend, hdmi_lpe_audio_resume) |
1911 | SET_RUNTIME_PM_OPS(hdmi_lpe_audio_runtime_suspend, | ||
1912 | hdmi_lpe_audio_runtime_resume, NULL) | ||
1913 | }; | 1897 | }; |
1914 | 1898 | ||
1915 | static struct platform_driver hdmi_lpe_audio_driver = { | 1899 | static struct platform_driver hdmi_lpe_audio_driver = { |