Commit ae69d94f authored by Takashi Iwai's avatar Takashi Iwai

ALSA: aoa: 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: default avatarTakashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240207155140.18238-11-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 36cd7671
...@@ -1126,7 +1126,6 @@ static void aoa_fabric_layout_remove(struct soundbus_dev *sdev) ...@@ -1126,7 +1126,6 @@ static void aoa_fabric_layout_remove(struct soundbus_dev *sdev)
sdev->pcmname = NULL; sdev->pcmname = NULL;
} }
#ifdef CONFIG_PM_SLEEP
static int aoa_fabric_layout_suspend(struct device *dev) static int aoa_fabric_layout_suspend(struct device *dev)
{ {
struct layout_dev *ldev = dev_get_drvdata(dev); struct layout_dev *ldev = dev_get_drvdata(dev);
...@@ -1147,11 +1146,9 @@ static int aoa_fabric_layout_resume(struct device *dev) ...@@ -1147,11 +1146,9 @@ static int aoa_fabric_layout_resume(struct device *dev)
return 0; return 0;
} }
static SIMPLE_DEV_PM_OPS(aoa_fabric_layout_pm_ops, static DEFINE_SIMPLE_DEV_PM_OPS(aoa_fabric_layout_pm_ops,
aoa_fabric_layout_suspend, aoa_fabric_layout_resume); aoa_fabric_layout_suspend, aoa_fabric_layout_resume);
#endif
static struct soundbus_driver aoa_soundbus_driver = { static struct soundbus_driver aoa_soundbus_driver = {
.name = "snd_aoa_soundbus_drv", .name = "snd_aoa_soundbus_drv",
.owner = THIS_MODULE, .owner = THIS_MODULE,
...@@ -1159,9 +1156,7 @@ static struct soundbus_driver aoa_soundbus_driver = { ...@@ -1159,9 +1156,7 @@ static struct soundbus_driver aoa_soundbus_driver = {
.remove = aoa_fabric_layout_remove, .remove = aoa_fabric_layout_remove,
.driver = { .driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
#ifdef CONFIG_PM_SLEEP
.pm = &aoa_fabric_layout_pm_ops, .pm = &aoa_fabric_layout_pm_ops,
#endif
} }
}; };
......
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