ASoC: fsl_audmix: Switch to RUNTIME/SYSTEM_SLEEP_PM_OPS()
Subsystems (4)
Fabio Estevam
reviewerPATCH 1/7 ASoC: fsl_audmix: Switch to RUNTIME/SYSTEM_SLEEP_PM_OPS()
From: Fabio Estevam <[email protected]>
Replace SET_RUNTIME_PM_OPS()/SET SYSTEM_SLEEP_PM_OPS() with their modern RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() alternatives.
The combined usage of pm_ptr() and RUNTIME_PM_OPS/SYSTEM_SLEEP_PM_OPS() allows the compiler to evaluate if the runtime suspend/resume() functions are used at build time or are simply dead code.
This allows removing the CONFIG_PM ifdefery from the runtime suspend/resume() functions.
--- sound/soc/fsl/fsl_audmix.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)
sound/soc/fsl/fsl_audmix.c +4 -8
@@ -512,7 +512,6 @@ static void fsl_audmix_remove(struct platform_device *pdev)platform_device_unregister (priv->pdev); } -#ifdef CONFIG_PM static int fsl_audmix_runtime_resume (struct device *dev) {struct fsl_audmix *priv =dev_get_drvdata (dev);
@@ -540,14 +539,11 @@ static int fsl_audmix_runtime_suspend(struct device *dev)return 0 ; } -#endif /* CONFIG_PM */ static const struct dev_pm_ops fsl_audmix_pm = { - SET_RUNTIME_PM_OPS(fsl_audmix_runtime_suspend, - fsl_audmix_runtime_resume, - NULL) -SET_SYSTEM_SLEEP_PM_OPS (pm_runtime_force_suspend, - pm_runtime_force_resume) + RUNTIME_PM_OPS(fsl_audmix_runtime_suspend, fsl_audmix_runtime_resume, + NULL) +SYSTEM_SLEEP_PM_OPS (pm_runtime_force_suspend, pm_runtime_force_resume) };static struct platform_driver fsl_audmix_driver = {
@@ -556,7 +552,7 @@ static struct platform_driver fsl_audmix_driver = { .driver = { .name = "fsl-audmix", .of_match_table = fsl_audmix_ids, - .pm = &fsl_audmix_pm, + .pm = pm_ptr(&fsl_audmix_pm), }, };module_platform_driver (fsl_audmix_driver);
Signature · 1 line
2.34.1
Fabio Estevam
reviewerPATCH 2/7 ASoC: fsl_mqs: Switch to RUNTIME/SYSTEM_SLEEP_PM_OPS()
From: Fabio Estevam <[email protected]>
Replace SET_RUNTIME_PM_OPS()/SET SYSTEM_SLEEP_PM_OPS() with their modern RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() alternatives.
The combined usage of pm_ptr() and RUNTIME_PM_OPS/SYSTEM_SLEEP_PM_OPS() allows the compiler to evaluate if the runtime suspend/resume() functions are used at build time or are simply dead code.
This allows removing the CONFIG_PM ifdefery from the runtime suspend/resume() functions.
--- sound/soc/fsl/fsl_mqs.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)
sound/soc/fsl/fsl_mqs.c +3 -8
@@ -265,7 +265,6 @@ static void fsl_mqs_remove(struct platform_device *pdev)pm_runtime_disable (&pdev->dev); } -#ifdef CONFIG_PM static int fsl_mqs_runtime_resume (struct device *dev) {struct fsl_mqs *mqs_priv =dev_get_drvdata (dev);
@@ -299,14 +298,10 @@ static int fsl_mqs_runtime_suspend(struct device *dev)return 0 ; } -#endif static const struct dev_pm_ops fsl_mqs_pm_ops = { - SET_RUNTIME_PM_OPS(fsl_mqs_runtime_suspend, - fsl_mqs_runtime_resume, - NULL) -SET_SYSTEM_SLEEP_PM_OPS (pm_runtime_force_suspend, - pm_runtime_force_resume) + RUNTIME_PM_OPS(fsl_mqs_runtime_suspend, fsl_mqs_runtime_resume, NULL) +SYSTEM_SLEEP_PM_OPS (pm_runtime_force_suspend, pm_runtime_force_resume) };static const struct fsl_mqs_soc_data fsl_mqs_imx8qm_data = {
@@ -390,7 +385,7 @@ static struct platform_driver fsl_mqs_driver = { .driver = { .name = "fsl-mqs", .of_match_table = fsl_mqs_dt_ids, - .pm = &fsl_mqs_pm_ops, + .pm = pm_ptr(&fsl_mqs_pm_ops), }, };
Signature · 1 line
2.34.1
Fabio Estevam
reviewerPATCH 3/7 ASoC: fsl_rpmsg: Switch to RUNTIME_PM_OPS()
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
Replace SET_RUNTIME_PM_OPS() with its modern RUNTIME_PM_OPS() alternative.
The combined usage of pm_ptr() and RUNTIME_PM_OPS() allows the compiler to evaluate if the runtime suspend/resume() functions are used at build time or are simply dead code.
This allows removing the CONFIG_PM ifdefery from the runtime suspend/resume() functions.
--- sound/soc/fsl/fsl_rpmsg.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
sound/soc/fsl/fsl_rpmsg.c +3 -6
@@ -286,7 +286,6 @@ static void fsl_rpmsg_remove(struct platform_device *pdev)platform_device_unregister (rpmsg->card_pdev); } -#ifdef CONFIG_PM static int fsl_rpmsg_runtime_resume (struct device *dev) {struct fsl_rpmsg *rpmsg =dev_get_drvdata (dev);
@@ -321,12 +320,10 @@ static int fsl_rpmsg_runtime_suspend(struct device *dev)return 0 ; } -#endif static const struct dev_pm_ops fsl_rpmsg_pm_ops = { -SET_RUNTIME_PM_OPS (fsl_rpmsg_runtime_suspend, - fsl_rpmsg_runtime_resume, -NULL ) +RUNTIME_PM_OPS (fsl_rpmsg_runtime_suspend, fsl_rpmsg_runtime_resume, +NULL ) };static struct platform_driver fsl_rpmsg_driver = {
@@ -334,7 +331,7 @@ static struct platform_driver fsl_rpmsg_driver = { .remove_new = fsl_rpmsg_remove, .driver = { .name = "fsl_rpmsg", - .pm = &fsl_rpmsg_pm_ops, + .pm = pm_ptr(&fsl_rpmsg_pm_ops), .of_match_table = fsl_rpmsg_ids, }, };
Signature · 1 line
2.34.1
Fabio Estevam
reviewerPATCH 4/7 ASoC: fsl_spdif: Switch to RUNTIME/SYSTEM_SLEEP_PM_OPS()
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
Replace SET_RUNTIME_PM_OPS()/SET SYSTEM_SLEEP_PM_OPS() with their modern RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() alternatives.
The combined usage of pm_ptr() and RUNTIME_PM_OPS/SYSTEM_SLEEP_PM_OPS() allows the compiler to evaluate if the runtime suspend/resume() functions are used at build time or are simply dead code.
This allows removing the CONFIG_PM ifdefery from the runtime suspend/resume() functions.
--- sound/soc/fsl/fsl_spdif.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-)
sound/soc/fsl/fsl_spdif.c +4 -7
@@ -1667,7 +1667,6 @@ static void fsl_spdif_remove(struct platform_device *pdev)pm_runtime_disable (&pdev->dev); } -#ifdef CONFIG_PM static int fsl_spdif_runtime_suspend (struct device *dev) {struct fsl_spdif_priv *spdif_priv =dev_get_drvdata (dev);
@@ -1739,13 +1738,11 @@ static int fsl_spdif_runtime_resume(struct device *dev)return ret; } -#endif /* CONFIG_PM */ static const struct dev_pm_ops fsl_spdif_pm = { - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) -SET_RUNTIME_PM_OPS (fsl_spdif_runtime_suspend, fsl_spdif_runtime_resume, -NULL ) + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) +RUNTIME_PM_OPS (fsl_spdif_runtime_suspend, fsl_spdif_runtime_resume, +NULL ) };static const struct of_device_id fsl_spdif_dt_ids[] = {
@@ -1763,7 +1760,7 @@ static struct platform_driver fsl_spdif_driver = { .driver = { .name = "fsl-spdif-dai", .of_match_table = fsl_spdif_dt_ids, - .pm = &fsl_spdif_pm, + .pm = pm_ptr(&fsl_spdif_pm), }, .probe = fsl_spdif_probe, .remove_new = fsl_spdif_remove,
Signature · 1 line
2.34.1
Fabio Estevam
reviewerPATCH 5/7 ASoC: fsl_ssi: Switch to SYSTEM_SLEEP_PM_OPS
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
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.
--- sound/soc/fsl/fsl_ssi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
sound/soc/fsl/fsl_ssi.c +2 -4
@@ -1693,7 +1693,6 @@ static void fsl_ssi_remove(struct platform_device *pdev) } } -#ifdef CONFIG_PM_SLEEP static int fsl_ssi_suspend (struct device *dev) {struct fsl_ssi *ssi =dev_get_drvdata (dev);
@@ -1723,17 +1722,16 @@ static int fsl_ssi_resume(struct device *dev)return regcache_sync (regs); } -#endif /* CONFIG_PM_SLEEP */ static const struct dev_pm_ops fsl_ssi_pm = { -SET_SYSTEM_SLEEP_PM_OPS (fsl_ssi_suspend, fsl_ssi_resume) +SYSTEM_SLEEP_PM_OPS (fsl_ssi_suspend, fsl_ssi_resume) };static struct platform_driver fsl_ssi_driver = { .driver = { .name ="fsl-ssi-dai" , .of_match_table = fsl_ssi_ids, - .pm = &fsl_ssi_pm, + .pm =pm_sleep_ptr (&fsl_ssi_pm), }, .probe = fsl_ssi_probe, .remove_new = fsl_ssi_remove,
Signature · 1 line
2.34.1
Fabio Estevam
reviewerPATCH 6/7 ASoC: imx-audmux: Switch to SYSTEM_SLEEP_PM_OPS
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
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.
--- sound/soc/fsl/imx-audmux.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
sound/soc/fsl/imx-audmux.c +2 -4
@@ -320,7 +320,6 @@ static void imx_audmux_remove(struct platform_device *pdev)audmux_debugfs_remove (); } -#ifdef CONFIG_PM_SLEEP static int imx_audmux_suspend (struct device *dev) {int i;
@@ -348,10 +347,9 @@ static int imx_audmux_resume(struct device *dev)return 0 ; } -#endif /* CONFIG_PM_SLEEP */ static const struct dev_pm_ops imx_audmux_pm = { -SET_SYSTEM_SLEEP_PM_OPS (imx_audmux_suspend, imx_audmux_resume) +SYSTEM_SLEEP_PM_OPS (imx_audmux_suspend, imx_audmux_resume) };static struct platform_driver imx_audmux_driver = {
@@ -359,7 +357,7 @@ static struct platform_driver imx_audmux_driver = { .remove_new = imx_audmux_remove, .driver = { .name = DRIVER_NAME, - .pm = &imx_audmux_pm, + .pm = pm_sleep_ptr(&imx_audmux_pm), .of_match_table = imx_audmux_dt_ids, } };
Signature · 1 line
2.34.1
Fabio Estevam
reviewerPATCH 7/7 ASoC: imx-pcm-rpmsg: Switch to RUNTIME/SYSTEM_SLEEP_PM_OPS()
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
Replace SET_RUNTIME_PM_OPS()/SET SYSTEM_SLEEP_PM_OPS() with their modern RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() alternatives.
The combined usage of pm_ptr() and RUNTIME_PM_OPS/SYSTEM_SLEEP_PM_OPS() allows the compiler to evaluate if the runtime suspend/resume() functions are used at build time or are simply dead code.
This allows removing the CONFIG_PM ifdefery from the runtime suspend/resume() functions.
--- sound/soc/fsl/imx-pcm-rpmsg.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-)
sound/soc/fsl/imx-pcm-rpmsg.c +4 -10
@@ -753,7 +753,6 @@ static void imx_rpmsg_pcm_remove(struct platform_device *pdev)destroy_workqueue (info->rpmsg_wq); } -#ifdef CONFIG_PM static int imx_rpmsg_pcm_runtime_resume (struct device *dev) {struct rpmsg_info *info =dev_get_drvdata (dev);
@@ -771,9 +770,7 @@ static int imx_rpmsg_pcm_runtime_suspend(struct device *dev)return 0 ; } -#endif -#ifdef CONFIG_PM_SLEEP static int imx_rpmsg_pcm_suspend (struct device *dev) {struct rpmsg_info *info =dev_get_drvdata (dev);
@@ -809,14 +806,11 @@ static int imx_rpmsg_pcm_resume(struct device *dev)return 0 ; } -#endif /* CONFIG_PM_SLEEP */ static const struct dev_pm_ops imx_rpmsg_pcm_pm_ops = { - SET_RUNTIME_PM_OPS(imx_rpmsg_pcm_runtime_suspend, - imx_rpmsg_pcm_runtime_resume, - NULL) -SET_SYSTEM_SLEEP_PM_OPS (imx_rpmsg_pcm_suspend, - imx_rpmsg_pcm_resume) + RUNTIME_PM_OPS(imx_rpmsg_pcm_runtime_suspend, + imx_rpmsg_pcm_runtime_resume, NULL) +SYSTEM_SLEEP_PM_OPS (imx_rpmsg_pcm_suspend, imx_rpmsg_pcm_resume) };static const struct platform_device_id imx_rpmsg_pcm_id_table[] = {
@@ -832,7 +826,7 @@ static struct platform_driver imx_pcm_rpmsg_driver = { .id_table = imx_rpmsg_pcm_id_table, .driver = { .name = IMX_PCM_DRV_NAME, - .pm = &imx_rpmsg_pcm_pm_ops, + .pm = pm_ptr(&imx_rpmsg_pcm_pm_ops), }, };module_platform_driver (imx_pcm_rpmsg_driver);
Signature · 1 line
2.34.1
Mark Brown
maintainerQuoted 8 lines · Fabio Estevam
Replace SET_RUNTIME_PM_OPS()/SET
SYSTEM_SLEEP_PM_OPS()with their modernRUNTIME_PM_OPS()andSYSTEM_SLEEP_PM_OPS()alternatives.The combined usage of
pm_ptr()and RUNTIME_PM_OPS/SYSTEM_SLEEP_PM_OPS() allows the compiler to evaluate if the runtime suspend/resume() functions are used at build time or are simply dead code.[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/7] ASoC: fsl_audmix: Switch to RUNTIME/SYSTEM_SLEEP_PM_OPS()
commit: 73abd9698960c5d097559432cac13bb1f0aaf3df
[2/7] ASoC: fsl_mqs: Switch to RUNTIME/SYSTEM_SLEEP_PM_OPS()
commit: b7e4dd8da05a9de18471868a914d609522d04fdd
[3/7] ASoC: fsl_rpmsg: Switch to RUNTIME_PM_OPS()
commit: bbc0798c402acb6799a8332fb0a49c05f4a5a414
[4/7] ASoC: fsl_spdif: Switch to RUNTIME/SYSTEM_SLEEP_PM_OPS()
commit: 01661bb9560def44eff0c79ebf14ec7ce0fdffab
[5/7] ASoC: fsl_ssi: Switch to SYSTEM_SLEEP_PM_OPS
commit: 8ffb2fe2e92c98e5c69e9af9656baed7d298059a
[6/7] ASoC: imx-audmux: Switch to SYSTEM_SLEEP_PM_OPS
commit: c504885a351b57c26c077992dde6904b8bbbdcd4
[7/7] ASoC: imx-pcm-rpmsg: Switch to RUNTIME/SYSTEM_SLEEP_PM_OPS()
commit: bcbbf713061c41f696f47baa4bdcb789a59d4f21All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark