diff options
author | 2025-03-17 10:54:23 +0100 | |
---|---|---|
committer | 2025-03-17 10:13:47 +0000 | |
commit | 958448bfee503d24e706605f01b98d3ce547d1bd (patch) | |
tree | 0f0066ac2a2507bef19aaa697ccc9152723174ee /sound/soc/au1x/psc-i2s.c | |
parent | ASoC: sun4i-codec: add headphone dectection for (diff) | |
download | wireguard-linux-958448bfee503d24e706605f01b98d3ce547d1bd.tar.xz wireguard-linux-958448bfee503d24e706605f01b98d3ce547d1bd.zip |
ASoC: au1x: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
Use the new DEFINE_SIMPLE_DEV_PM_OPS() macro instead of open code
together with pm_ptr(), which allows us dropping CONFIG_PM ifdefs.
Merely a cleanup, there should be no actual code change.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250317095603.20073-2-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to '')
-rw-r--r-- | sound/soc/au1x/psc-i2s.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/sound/soc/au1x/psc-i2s.c b/sound/soc/au1x/psc-i2s.c index bee013555e7a..bf59105fcb7a 100644 --- a/sound/soc/au1x/psc-i2s.c +++ b/sound/soc/au1x/psc-i2s.c @@ -354,7 +354,6 @@ static void au1xpsc_i2s_drvremove(struct platform_device *pdev) wmb(); /* drain writebuffer */ } -#ifdef CONFIG_PM static int au1xpsc_i2s_drvsuspend(struct device *dev) { struct au1xpsc_audio_data *wd = dev_get_drvdata(dev); @@ -385,23 +384,13 @@ static int au1xpsc_i2s_drvresume(struct device *dev) return 0; } -static const struct dev_pm_ops au1xpsci2s_pmops = { - .suspend = au1xpsc_i2s_drvsuspend, - .resume = au1xpsc_i2s_drvresume, -}; - -#define AU1XPSCI2S_PMOPS &au1xpsci2s_pmops - -#else - -#define AU1XPSCI2S_PMOPS NULL - -#endif +static DEFINE_SIMPLE_DEV_PM_OPS(au1xpsci2s_pmops, au1xpsc_i2s_drvsuspend, + au1xpsc_i2s_drvresume); static struct platform_driver au1xpsc_i2s_driver = { .driver = { .name = "au1xpsc_i2s", - .pm = AU1XPSCI2S_PMOPS, + .pm = pm_ptr(&au1xpsci2s_pmops), }, .probe = au1xpsc_i2s_drvprobe, .remove = au1xpsc_i2s_drvremove, |