[PATCH 5/9] ALSA: hda-intel: Convert to RUNTIME_PM_OPS()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Use the newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_PM_OPS()
together with pm_ptr(), which allows us dropping ugly __maybe_unused
attributes.

This optimizes slightly	when CONFIG_PM is disabled, too.

Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
---
 sound/pci/hda/hda_intel.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 3f11f169fe4a..62ee32f70adc 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1051,7 +1051,7 @@ static int azx_suspend(struct device *dev)
 	return 0;
 }
 
-static int __maybe_unused azx_resume(struct device *dev)
+static int azx_resume(struct device *dev)
 {
 	struct snd_card *card = dev_get_drvdata(dev);
 	struct azx *chip;
@@ -1098,7 +1098,7 @@ static int azx_thaw_noirq(struct device *dev)
 	return 0;
 }
 
-static int __maybe_unused azx_runtime_suspend(struct device *dev)
+static int azx_runtime_suspend(struct device *dev)
 {
 	struct snd_card *card = dev_get_drvdata(dev);
 	struct azx *chip;
@@ -1115,7 +1115,7 @@ static int __maybe_unused azx_runtime_suspend(struct device *dev)
 	return 0;
 }
 
-static int __maybe_unused azx_runtime_resume(struct device *dev)
+static int azx_runtime_resume(struct device *dev)
 {
 	struct snd_card *card = dev_get_drvdata(dev);
 	struct azx *chip;
@@ -1132,7 +1132,7 @@ static int __maybe_unused azx_runtime_resume(struct device *dev)
 	return 0;
 }
 
-static int __maybe_unused azx_runtime_idle(struct device *dev)
+static int azx_runtime_idle(struct device *dev)
 {
 	struct snd_card *card = dev_get_drvdata(dev);
 	struct azx *chip;
@@ -1163,7 +1163,7 @@ static const struct dev_pm_ops azx_pm = {
 	.complete = pm_sleep_ptr(azx_complete),
 	.freeze_noirq = pm_sleep_ptr(azx_freeze_noirq),
 	.thaw_noirq = pm_sleep_ptr(azx_thaw_noirq),
-	SET_RUNTIME_PM_OPS(azx_runtime_suspend, azx_runtime_resume, azx_runtime_idle)
+	RUNTIME_PM_OPS(azx_runtime_suspend, azx_runtime_resume, azx_runtime_idle)
 };
 
 
@@ -2795,7 +2795,7 @@ static struct pci_driver azx_driver = {
 	.remove = azx_remove,
 	.shutdown = azx_shutdown,
 	.driver = {
-		.pm = &azx_pm,
+		.pm = pm_ptr(&azx_pm),
 	},
 };
 
-- 
2.43.0





[Index of Archives]     [Pulseaudio]     [Linux Audio Users]     [ALSA Devel]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux