summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2018-10-24 11:48:25 -0400
committerVille Syrjälä <ville.syrjala@linux.intel.com>2018-11-02 12:25:33 -0400
commit0019457e31b2ebf3fab38c20c8097e658daea9b8 (patch)
treed097cee7830dd6f25af039e772dc185380de27d8
parent8dfb839cfe737a17def8e5f88ee13c295230364a (diff)
ALSA: x86: Rip out the lpe audio runtime suspend/resume hooks
Ever since commit 46e831abe864 ("drm/i915/lpe: Mark LPE audio runtime pm as "no callbacks"") the runtime suspend/resume hooks are no longer used. Inline them into the system suspend hooks. Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Takashi Iwai <tiwai@suse.de> Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20181024154825.18185-2-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/x86/intel_hdmi_audio.c25
1 files changed, 5 insertions, 20 deletions
diff --git a/sound/x86/intel_hdmi_audio.c b/sound/x86/intel_hdmi_audio.c
index ec50d1d0b5fe..202bf16f85fd 100644
--- a/sound/x86/intel_hdmi_audio.c
+++ b/sound/x86/intel_hdmi_audio.c
@@ -1671,7 +1671,7 @@ static int had_create_jack(struct snd_intelhad *ctx,
1671 * PM callbacks 1671 * PM callbacks
1672 */ 1672 */
1673 1673
1674static int hdmi_lpe_audio_runtime_suspend(struct device *dev) 1674static int __maybe_unused hdmi_lpe_audio_suspend(struct device *dev)
1675{ 1675{
1676 struct snd_intelhad_card *card_ctx = dev_get_drvdata(dev); 1676 struct snd_intelhad_card *card_ctx = dev_get_drvdata(dev);
1677 int port; 1677 int port;
@@ -1687,23 +1687,8 @@ static int hdmi_lpe_audio_runtime_suspend(struct device *dev)
1687 } 1687 }
1688 } 1688 }
1689 1689
1690 return 0; 1690 snd_power_change_state(card_ctx->card, SNDRV_CTL_POWER_D3hot);
1691}
1692
1693static int __maybe_unused hdmi_lpe_audio_suspend(struct device *dev)
1694{
1695 struct snd_intelhad_card *card_ctx = dev_get_drvdata(dev);
1696 int err;
1697 1691
1698 err = hdmi_lpe_audio_runtime_suspend(dev);
1699 if (!err)
1700 snd_power_change_state(card_ctx->card, SNDRV_CTL_POWER_D3hot);
1701 return err;
1702}
1703
1704static int hdmi_lpe_audio_runtime_resume(struct device *dev)
1705{
1706 pm_runtime_mark_last_busy(dev);
1707 return 0; 1692 return 0;
1708} 1693}
1709 1694
@@ -1711,8 +1696,10 @@ static int __maybe_unused hdmi_lpe_audio_resume(struct device *dev)
1711{ 1696{
1712 struct snd_intelhad_card *card_ctx = dev_get_drvdata(dev); 1697 struct snd_intelhad_card *card_ctx = dev_get_drvdata(dev);
1713 1698
1714 hdmi_lpe_audio_runtime_resume(dev); 1699 pm_runtime_mark_last_busy(dev);
1700
1715 snd_power_change_state(card_ctx->card, SNDRV_CTL_POWER_D0); 1701 snd_power_change_state(card_ctx->card, SNDRV_CTL_POWER_D0);
1702
1716 return 0; 1703 return 0;
1717} 1704}
1718 1705
@@ -1930,8 +1917,6 @@ static int hdmi_lpe_audio_remove(struct platform_device *pdev)
1930 1917
1931static const struct dev_pm_ops hdmi_lpe_audio_pm = { 1918static const struct dev_pm_ops hdmi_lpe_audio_pm = {
1932 SET_SYSTEM_SLEEP_PM_OPS(hdmi_lpe_audio_suspend, hdmi_lpe_audio_resume) 1919 SET_SYSTEM_SLEEP_PM_OPS(hdmi_lpe_audio_suspend, hdmi_lpe_audio_resume)
1933 SET_RUNTIME_PM_OPS(hdmi_lpe_audio_runtime_suspend,
1934 hdmi_lpe_audio_runtime_resume, NULL)
1935}; 1920};
1936 1921
1937static struct platform_driver hdmi_lpe_audio_driver = { 1922static struct platform_driver hdmi_lpe_audio_driver = {