diff options
author | 2025-03-13 18:07:22 +0100 | |
---|---|---|
committer | 2025-03-14 11:07:13 +0100 | |
commit | 3f38aa32c51eb9c3b124004e11ee48fbca3c55e7 (patch) | |
tree | 9603ea5643c888b8b53804073e600e6396816572 | |
parent | ALSA: pcm: Convert to SYSTEM_SLEEP_PM_OPS() (diff) | |
download | wireguard-linux-3f38aa32c51eb9c3b124004e11ee48fbca3c55e7.tar.xz wireguard-linux-3f38aa32c51eb9c3b124004e11ee48fbca3c55e7.zip |
ALSA: hda: Use RUNTIME_PM_OPS() and pm_ptr()
Clean up the code with the helper macros, and also assure that no PM
ops is assigned without CONFIG_PM via pm_ptr().
Merely a cleanup, there should be no actual code change.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250313170731.26943-5-tiwai@suse.de
-rw-r--r-- | sound/pci/hda/hda_bind.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/hda_codec.c | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/sound/pci/hda/hda_bind.c b/sound/pci/hda/hda_bind.c index b7ca2a83fbb0..9521e5e0e6e6 100644 --- a/sound/pci/hda/hda_bind.c +++ b/sound/pci/hda/hda_bind.c @@ -185,7 +185,7 @@ int __hda_codec_driver_register(struct hda_codec_driver *drv, const char *name, drv->core.driver.probe = hda_codec_driver_probe; drv->core.driver.remove = hda_codec_driver_remove; drv->core.driver.shutdown = hda_codec_driver_shutdown; - drv->core.driver.pm = &hda_codec_driver_pm; + drv->core.driver.pm = pm_ptr(&hda_codec_driver_pm); drv->core.type = HDA_DEV_LEGACY; drv->core.match = hda_codec_match; drv->core.unsol_event = hda_codec_unsol_event; diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 14763c0f31ad..b9bce583476e 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -3037,8 +3037,7 @@ const struct dev_pm_ops hda_codec_driver_pm = { .thaw = pm_sleep_ptr(hda_codec_pm_thaw), .poweroff = pm_sleep_ptr(hda_codec_pm_suspend), .restore = pm_sleep_ptr(hda_codec_pm_restore), - .runtime_suspend = pm_ptr(hda_codec_runtime_suspend), - .runtime_resume = pm_ptr(hda_codec_runtime_resume), + RUNTIME_PM_OPS(hda_codec_runtime_suspend, hda_codec_runtime_resume, NULL) }; /* suspend the codec at shutdown; called from driver's shutdown callback */ |