Skip to content

Commit

Permalink
ALSA: x86: Rip out the lpe audio runtime suspend/resume hooks
Browse files Browse the repository at this point in the history
Ever since commit 46e831a ("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 <[email protected]>
Cc: Takashi Iwai <[email protected]>
Cc: Pierre-Louis Bossart <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Chris Wilson <[email protected]>
Acked-by: Takashi Iwai <[email protected]>
  • Loading branch information
vsyrjala committed Nov 2, 2018
1 parent 8dfb839 commit 0019457
Showing 1 changed file with 5 additions and 20 deletions.
25 changes: 5 additions & 20 deletions sound/x86/intel_hdmi_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1671,7 +1671,7 @@ static int had_create_jack(struct snd_intelhad *ctx,
* 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);
int port;
Expand All @@ -1687,32 +1687,19 @@ static int hdmi_lpe_audio_runtime_suspend(struct device *dev)
}
}

return 0;
}

static int __maybe_unused hdmi_lpe_audio_suspend(struct device *dev)
{
struct snd_intelhad_card *card_ctx = dev_get_drvdata(dev);
int err;
snd_power_change_state(card_ctx->card, SNDRV_CTL_POWER_D3hot);

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;
}

static int __maybe_unused hdmi_lpe_audio_resume(struct device *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);

return 0;
}

Expand Down Expand Up @@ -1930,8 +1917,6 @@ static int hdmi_lpe_audio_remove(struct platform_device *pdev)

static const struct dev_pm_ops hdmi_lpe_audio_pm = {
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 = {
Expand Down

0 comments on commit 0019457

Please sign in to comment.