Skip to content

Commit dd69342

Browse files
committed
ALSA: hda-intel: Convert to RUNTIME_PM_OPS()
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 <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent 3f38aa3 commit dd69342

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

sound/pci/hda/hda_intel.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,7 +1051,7 @@ static int azx_suspend(struct device *dev)
10511051
return 0;
10521052
}
10531053

1054-
static int __maybe_unused azx_resume(struct device *dev)
1054+
static int azx_resume(struct device *dev)
10551055
{
10561056
struct snd_card *card = dev_get_drvdata(dev);
10571057
struct azx *chip;
@@ -1098,7 +1098,7 @@ static int azx_thaw_noirq(struct device *dev)
10981098
return 0;
10991099
}
11001100

1101-
static int __maybe_unused azx_runtime_suspend(struct device *dev)
1101+
static int azx_runtime_suspend(struct device *dev)
11021102
{
11031103
struct snd_card *card = dev_get_drvdata(dev);
11041104
struct azx *chip;
@@ -1115,7 +1115,7 @@ static int __maybe_unused azx_runtime_suspend(struct device *dev)
11151115
return 0;
11161116
}
11171117

1118-
static int __maybe_unused azx_runtime_resume(struct device *dev)
1118+
static int azx_runtime_resume(struct device *dev)
11191119
{
11201120
struct snd_card *card = dev_get_drvdata(dev);
11211121
struct azx *chip;
@@ -1132,7 +1132,7 @@ static int __maybe_unused azx_runtime_resume(struct device *dev)
11321132
return 0;
11331133
}
11341134

1135-
static int __maybe_unused azx_runtime_idle(struct device *dev)
1135+
static int azx_runtime_idle(struct device *dev)
11361136
{
11371137
struct snd_card *card = dev_get_drvdata(dev);
11381138
struct azx *chip;
@@ -1163,7 +1163,7 @@ static const struct dev_pm_ops azx_pm = {
11631163
.complete = pm_sleep_ptr(azx_complete),
11641164
.freeze_noirq = pm_sleep_ptr(azx_freeze_noirq),
11651165
.thaw_noirq = pm_sleep_ptr(azx_thaw_noirq),
1166-
SET_RUNTIME_PM_OPS(azx_runtime_suspend, azx_runtime_resume, azx_runtime_idle)
1166+
RUNTIME_PM_OPS(azx_runtime_suspend, azx_runtime_resume, azx_runtime_idle)
11671167
};
11681168

11691169

@@ -2795,7 +2795,7 @@ static struct pci_driver azx_driver = {
27952795
.remove = azx_remove,
27962796
.shutdown = azx_shutdown,
27972797
.driver = {
2798-
.pm = &azx_pm,
2798+
.pm = pm_ptr(&azx_pm),
27992799
},
28002800
};
28012801

0 commit comments

Comments
 (0)