Commit 78d39246 authored by Cristian Ciocaltea's avatar Cristian Ciocaltea Committed by Mark Brown

ASoC: amd: vangogh: Switch to {RUNTIME,SYSTEM_SLEEP}_PM_OPS

Replace the old SET_{RUNTIME,SYSTEM_SLEEP}_PM_OPS() helpers with their
modern alternatives and drop the now unnecessary __maybe_unused
qualifier in the suspend and resume functions.

Additionally, make use of pm_ptr() to ensure the PM ops are dropped when
building with CONFIG_PM disabled.
Signed-off-by: default avatarCristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: default avatarEmil Velikov <emil.velikov@collabora.com>
Link: https://msgid.link/r/20231209203229.878730-4-cristian.ciocaltea@collabora.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 2cef11ec
......@@ -264,7 +264,7 @@ static int snd_acp5x_probe(struct pci_dev *pci,
return ret;
}
static int __maybe_unused snd_acp5x_suspend(struct device *dev)
static int snd_acp5x_suspend(struct device *dev)
{
int ret;
struct acp5x_dev_data *adata;
......@@ -279,7 +279,7 @@ static int __maybe_unused snd_acp5x_suspend(struct device *dev)
return ret;
}
static int __maybe_unused snd_acp5x_resume(struct device *dev)
static int snd_acp5x_resume(struct device *dev)
{
int ret;
struct acp5x_dev_data *adata;
......@@ -294,9 +294,8 @@ static int __maybe_unused snd_acp5x_resume(struct device *dev)
}
static const struct dev_pm_ops acp5x_pm = {
SET_RUNTIME_PM_OPS(snd_acp5x_suspend,
snd_acp5x_resume, NULL)
SET_SYSTEM_SLEEP_PM_OPS(snd_acp5x_suspend, snd_acp5x_resume)
RUNTIME_PM_OPS(snd_acp5x_suspend, snd_acp5x_resume, NULL)
SYSTEM_SLEEP_PM_OPS(snd_acp5x_suspend, snd_acp5x_resume)
};
static void snd_acp5x_remove(struct pci_dev *pci)
......@@ -332,7 +331,7 @@ static struct pci_driver acp5x_driver = {
.probe = snd_acp5x_probe,
.remove = snd_acp5x_remove,
.driver = {
.pm = &acp5x_pm,
.pm = pm_ptr(&acp5x_pm),
}
};
......
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