Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: fsl_ssi: Switch to SYSTEM_SLEEP_PM_OPS

Replace SET_SYSTEM_SLEEP_PM_OPS() with its modern SYSTEM_SLEEP_PM_OPS()
alternative.

The combined usage of pm_sleep_ptr() and SYSTEM_SLEEP_PM_OPS() allows
the compiler to evaluate if the suspend/resume() functions are used at
build time or are simply dead code.

This allows removing the CONFIG_PM_SLEEP ifdefery from the
suspend/resume() functions.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Link: https://patch.msgid.link/20240808184944.267686-5-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Fabio Estevam and committed by
Mark Brown
8ffb2fe2 01661bb9

+2 -4
+2 -4
sound/soc/fsl/fsl_ssi.c
··· 1693 1693 } 1694 1694 } 1695 1695 1696 - #ifdef CONFIG_PM_SLEEP 1697 1696 static int fsl_ssi_suspend(struct device *dev) 1698 1697 { 1699 1698 struct fsl_ssi *ssi = dev_get_drvdata(dev); ··· 1722 1723 1723 1724 return regcache_sync(regs); 1724 1725 } 1725 - #endif /* CONFIG_PM_SLEEP */ 1726 1726 1727 1727 static const struct dev_pm_ops fsl_ssi_pm = { 1728 - SET_SYSTEM_SLEEP_PM_OPS(fsl_ssi_suspend, fsl_ssi_resume) 1728 + SYSTEM_SLEEP_PM_OPS(fsl_ssi_suspend, fsl_ssi_resume) 1729 1729 }; 1730 1730 1731 1731 static struct platform_driver fsl_ssi_driver = { 1732 1732 .driver = { 1733 1733 .name = "fsl-ssi-dai", 1734 1734 .of_match_table = fsl_ssi_ids, 1735 - .pm = &fsl_ssi_pm, 1735 + .pm = pm_sleep_ptr(&fsl_ssi_pm), 1736 1736 }, 1737 1737 .probe = fsl_ssi_probe, 1738 1738 .remove_new = fsl_ssi_remove,