diff options
author | Takashi Iwai <tiwai@suse.de> | 2024-02-07 16:51:25 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2024-02-12 11:50:25 +0100 |
commit | 8ca0d10268b8b5951de13a21eb24744dc88d2e4b (patch) | |
tree | 6576da612b31fb239930b302f4e1e6302708d85f | |
parent | 8e5ffd767bac48180235456255831083d0d00195 (diff) |
ALSA: at73c213: Replace with DEFINE_SIMPLE_DEV_PM_OPS()
Use the new DEFINE_SIMPLE_DEV_PM_OPS() instead of SIMPLE_DEV_PM_OPS()
for code-simplification. We need no longer CONFIG_PM_SLEEP ifdefs.
Just a cleanup, no functional changes.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240207155140.18238-15-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/spi/at73c213.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/sound/spi/at73c213.c b/sound/spi/at73c213.c index 1e8765d75d8f..5648d744aa79 100644 --- a/sound/spi/at73c213.c +++ b/sound/spi/at73c213.c @@ -1076,8 +1076,6 @@ out: snd_card_free(card); } -#ifdef CONFIG_PM_SLEEP - static int snd_at73c213_suspend(struct device *dev) { struct snd_card *card = dev_get_drvdata(dev); @@ -1109,18 +1107,13 @@ static int snd_at73c213_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(at73c213_pm_ops, snd_at73c213_suspend, +static DEFINE_SIMPLE_DEV_PM_OPS(at73c213_pm_ops, snd_at73c213_suspend, snd_at73c213_resume); -#define AT73C213_PM_OPS (&at73c213_pm_ops) - -#else -#define AT73C213_PM_OPS NULL -#endif static struct spi_driver at73c213_driver = { .driver = { .name = "at73c213", - .pm = AT73C213_PM_OPS, + .pm = &at73c213_pm_ops, }, .probe = snd_at73c213_probe, .remove = snd_at73c213_remove, |