Commit 0019457e authored by Ville Syrjälä's avatar Ville Syrjälä

ALSA: x86: Rip out the lpe audio runtime suspend/resume hooks

Ever since commit 46e831ab ("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: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181024154825.18185-2-ville.syrjala@linux.intel.comReviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Acked-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 8dfb839c
...@@ -1671,7 +1671,7 @@ static int had_create_jack(struct snd_intelhad *ctx, ...@@ -1671,7 +1671,7 @@ static int had_create_jack(struct snd_intelhad *ctx,
* PM callbacks * PM callbacks
*/ */
static int hdmi_lpe_audio_runtime_suspend(struct device *dev) static int __maybe_unused hdmi_lpe_audio_suspend(struct device *dev)
{ {
struct snd_intelhad_card *card_ctx = dev_get_drvdata(dev); struct snd_intelhad_card *card_ctx = dev_get_drvdata(dev);
int port; int port;
...@@ -1687,23 +1687,8 @@ static int hdmi_lpe_audio_runtime_suspend(struct device *dev) ...@@ -1687,23 +1687,8 @@ static int hdmi_lpe_audio_runtime_suspend(struct device *dev)
} }
} }
return 0; snd_power_change_state(card_ctx->card, SNDRV_CTL_POWER_D3hot);
}
static int __maybe_unused hdmi_lpe_audio_suspend(struct device *dev)
{
struct snd_intelhad_card *card_ctx = dev_get_drvdata(dev);
int err;
err = hdmi_lpe_audio_runtime_suspend(dev);
if (!err)
snd_power_change_state(card_ctx->card, SNDRV_CTL_POWER_D3hot);
return err;
}
static int hdmi_lpe_audio_runtime_resume(struct device *dev)
{
pm_runtime_mark_last_busy(dev);
return 0; return 0;
} }
...@@ -1711,8 +1696,10 @@ static int __maybe_unused hdmi_lpe_audio_resume(struct device *dev) ...@@ -1711,8 +1696,10 @@ static int __maybe_unused hdmi_lpe_audio_resume(struct device *dev)
{ {
struct snd_intelhad_card *card_ctx = dev_get_drvdata(dev); struct snd_intelhad_card *card_ctx = dev_get_drvdata(dev);
hdmi_lpe_audio_runtime_resume(dev); pm_runtime_mark_last_busy(dev);
snd_power_change_state(card_ctx->card, SNDRV_CTL_POWER_D0); snd_power_change_state(card_ctx->card, SNDRV_CTL_POWER_D0);
return 0; return 0;
} }
...@@ -1930,8 +1917,6 @@ static int hdmi_lpe_audio_remove(struct platform_device *pdev) ...@@ -1930,8 +1917,6 @@ static int hdmi_lpe_audio_remove(struct platform_device *pdev)
static const struct dev_pm_ops hdmi_lpe_audio_pm = { static const struct dev_pm_ops hdmi_lpe_audio_pm = {
SET_SYSTEM_SLEEP_PM_OPS(hdmi_lpe_audio_suspend, hdmi_lpe_audio_resume) SET_SYSTEM_SLEEP_PM_OPS(hdmi_lpe_audio_suspend, hdmi_lpe_audio_resume)
SET_RUNTIME_PM_OPS(hdmi_lpe_audio_runtime_suspend,
hdmi_lpe_audio_runtime_resume, NULL)
}; };
static struct platform_driver hdmi_lpe_audio_driver = { static struct platform_driver hdmi_lpe_audio_driver = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment