Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Mark Brown <broonie@kernel.org>
Cc: linux-sound@vger.kernel.org,
	Shengjiu Wang <shengjiu.wang@gmail.com>,
	Xiubo Li <Xiubo.Lee@gmail.com>,
	Fabio Estevam <festevam@gmail.com>,
	Nicolin Chen <nicoleotsuka@gmail.com>,
	Takashi Iwai <tiwai@suse.de>
Subject: [PATCH v2 59/88] ASoC: fsl: Convert to RUNTIME_PM_OPS() and co
Date: Mon, 17 Mar 2025 10:55:21 +0100	[thread overview]
Message-ID: <20250317095603.20073-60-tiwai@suse.de> (raw)
In-Reply-To: <20250317095603.20073-1-tiwai@suse.de>

Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros
instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together
with pm_ptr()

This optimizes slightly when CONFIG_PM is disabled, too.

Cc: Shengjiu Wang <shengjiu.wang@gmail.com>
Cc: Xiubo Li <Xiubo.Lee@gmail.com>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/soc/fsl/fsl_aud2htx.c | 3 +--
 sound/soc/fsl/fsl_esai.c    | 9 +++------
 sound/soc/fsl/fsl_micfil.c  | 9 +++------
 sound/soc/fsl/fsl_sai.c     | 8 +++-----
 sound/soc/fsl/fsl_xcvr.c    | 3 +--
 5 files changed, 11 insertions(+), 21 deletions(-)

diff --git a/sound/soc/fsl/fsl_aud2htx.c b/sound/soc/fsl/fsl_aud2htx.c
index bde642318835..da401561e2de 100644
--- a/sound/soc/fsl/fsl_aud2htx.c
+++ b/sound/soc/fsl/fsl_aud2htx.c
@@ -290,8 +290,7 @@ static int fsl_aud2htx_runtime_resume(struct device *dev)
 static const struct dev_pm_ops fsl_aud2htx_pm_ops = {
 	RUNTIME_PM_OPS(fsl_aud2htx_runtime_suspend, fsl_aud2htx_runtime_resume,
 		       NULL)
-	SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
-				pm_runtime_force_resume)
+	SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
 };
 
 static struct platform_driver fsl_aud2htx_driver = {
diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c
index 0b247f16a163..cde0b0c6c1ef 100644
--- a/sound/soc/fsl/fsl_esai.c
+++ b/sound/soc/fsl/fsl_esai.c
@@ -1189,11 +1189,8 @@ static int fsl_esai_runtime_suspend(struct device *dev)
 }
 
 static const struct dev_pm_ops fsl_esai_pm_ops = {
-	SET_RUNTIME_PM_OPS(fsl_esai_runtime_suspend,
-			   fsl_esai_runtime_resume,
-			   NULL)
-	SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
-				pm_runtime_force_resume)
+	RUNTIME_PM_OPS(fsl_esai_runtime_suspend, fsl_esai_runtime_resume, NULL)
+	SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
 };
 
 static struct platform_driver fsl_esai_driver = {
@@ -1201,7 +1198,7 @@ static struct platform_driver fsl_esai_driver = {
 	.remove = fsl_esai_remove,
 	.driver = {
 		.name = "fsl-esai-dai",
-		.pm = &fsl_esai_pm_ops,
+		.pm = pm_ptr(&fsl_esai_pm_ops),
 		.of_match_table = fsl_esai_dt_ids,
 	},
 };
diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c
index 73d8910a6188..aabd90a8b3ec 100644
--- a/sound/soc/fsl/fsl_micfil.c
+++ b/sound/soc/fsl/fsl_micfil.c
@@ -1512,11 +1512,8 @@ static int fsl_micfil_runtime_resume(struct device *dev)
 }
 
 static const struct dev_pm_ops fsl_micfil_pm_ops = {
-	SET_RUNTIME_PM_OPS(fsl_micfil_runtime_suspend,
-			   fsl_micfil_runtime_resume,
-			   NULL)
-	SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
-				pm_runtime_force_resume)
+	RUNTIME_PM_OPS(fsl_micfil_runtime_suspend, fsl_micfil_runtime_resume, NULL)
+	SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
 };
 
 static struct platform_driver fsl_micfil_driver = {
@@ -1524,7 +1521,7 @@ static struct platform_driver fsl_micfil_driver = {
 	.remove = fsl_micfil_remove,
 	.driver = {
 		.name = "fsl-micfil-dai",
-		.pm = &fsl_micfil_pm_ops,
+		.pm = pm_ptr(&fsl_micfil_pm_ops),
 		.of_match_table = fsl_micfil_dt_ids,
 	},
 };
diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
index 9f33dd11d47f..ed2b4780c470 100644
--- a/sound/soc/fsl/fsl_sai.c
+++ b/sound/soc/fsl/fsl_sai.c
@@ -1817,10 +1817,8 @@ static int fsl_sai_runtime_resume(struct device *dev)
 }
 
 static const struct dev_pm_ops fsl_sai_pm_ops = {
-	SET_RUNTIME_PM_OPS(fsl_sai_runtime_suspend,
-			   fsl_sai_runtime_resume, NULL)
-	SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
-				pm_runtime_force_resume)
+	RUNTIME_PM_OPS(fsl_sai_runtime_suspend, fsl_sai_runtime_resume, NULL)
+	SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
 };
 
 static struct platform_driver fsl_sai_driver = {
@@ -1828,7 +1826,7 @@ static struct platform_driver fsl_sai_driver = {
 	.remove = fsl_sai_remove,
 	.driver = {
 		.name = "fsl-sai",
-		.pm = &fsl_sai_pm_ops,
+		.pm = pm_ptr(&fsl_sai_pm_ops),
 		.of_match_table = fsl_sai_ids,
 	},
 };
diff --git a/sound/soc/fsl/fsl_xcvr.c b/sound/soc/fsl/fsl_xcvr.c
index c59c1af5a98a..83aea341c1b6 100644
--- a/sound/soc/fsl/fsl_xcvr.c
+++ b/sound/soc/fsl/fsl_xcvr.c
@@ -1821,8 +1821,7 @@ static int fsl_xcvr_runtime_resume(struct device *dev)
 
 static const struct dev_pm_ops fsl_xcvr_pm_ops = {
 	RUNTIME_PM_OPS(fsl_xcvr_runtime_suspend, fsl_xcvr_runtime_resume, NULL)
-	SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
-				pm_runtime_force_resume)
+	SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
 };
 
 static struct platform_driver fsl_xcvr_driver = {
-- 
2.43.0


  parent reply	other threads:[~2025-03-17  9:59 UTC|newest]

Thread overview: 94+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-17  9:54 [PATCH v2 00/88] ASoC: Convert to modern PM macros Takashi Iwai
2025-03-17  9:54 ` [PATCH v2 01/88] ASoC: au1x: Convert to DEFINE_SIMPLE_DEV_PM_OPS() Takashi Iwai
2025-03-17  9:54 ` [PATCH v2 02/88] ASoC: ak4375: Convert to RUNTIME_PM_OPS() & co Takashi Iwai
2025-03-17  9:54 ` [PATCH v2 03/88] ASoC: ak4458: " Takashi Iwai
2025-03-17  9:54 ` [PATCH v2 04/88] ASoC: ak5558: " Takashi Iwai
2025-03-17  9:54 ` [PATCH v2 05/88] ASoC: cs35l32: Convert to RUNTIME_PM_OPS() Takashi Iwai
2025-03-17  9:54 ` [PATCH v2 06/88] ASoC: cs35l33: " Takashi Iwai
2025-03-17  9:54 ` [PATCH v2 07/88] ASoC: cs35l34: " Takashi Iwai
2025-03-17  9:54 ` [PATCH v2 08/88] ASoC: cs4234: " Takashi Iwai
2025-03-17  9:54 ` [PATCH v2 09/88] ASoC: cs42l42: Convert to RUNTIME_PM_OPS() & co Takashi Iwai
2025-03-17  9:54 ` [PATCH v2 10/88] ASoC: cs42l51: Convert to SYSTEM_SLEEP_PM_OPS() Takashi Iwai
2025-03-17  9:54 ` [PATCH v2 11/88] ASoC: cs42l83: " Takashi Iwai
2025-03-17  9:54 ` [PATCH v2 12/88] ASoC: cs42xx8: Convert to EXPORT_GPL_DEV_PM_OPS() Takashi Iwai
2025-03-17  9:54 ` [PATCH v2 13/88] ASoC: cs43130: Convert to RUNTIME_PM_OPS() Takashi Iwai
2025-03-17  9:54 ` [PATCH v2 14/88] ASoC: cs4349: " Takashi Iwai
2025-03-17  9:54 ` [PATCH v2 15/88] ASoC: cs53l30: " Takashi Iwai
2025-03-17  9:54 ` [PATCH v2 16/88] ASoC: cx2072x: Convert to RUNTIME_PM_OPS() & co Takashi Iwai
2025-03-17  9:54 ` [PATCH v2 17/88] ASoC: da7213: " Takashi Iwai
2025-03-17  9:54 ` [PATCH v2 18/88] ASoC: hdac_hdmi: " Takashi Iwai
2025-03-17  9:54 ` [PATCH v2 19/88] ASoC: lpass: Convert to RUNTIME_PM_OPS() Takashi Iwai
2025-03-17  9:54 ` [PATCH v2 20/88] ASoC: max98090: Convert to RUNTIME_PM_OPS() & co Takashi Iwai
2025-03-17  9:54 ` [PATCH v2 21/88] ASoC: max98373: " Takashi Iwai
2025-03-17  9:54 ` [PATCH v2 22/88] ASoC: max98390: Convert to SYSTEM_SLEEP_PM_OPS() Takashi Iwai
2025-03-17  9:54 ` [PATCH v2 23/88] ASoC: max98396: " Takashi Iwai
2025-03-17  9:54 ` [PATCH v2 24/88] ASoC: max98520: " Takashi Iwai
2025-03-17  9:54 ` [PATCH v2 25/88] ASoC: max9860: Convert to RUNTIME_PM_OPS() Takashi Iwai
2025-03-17  9:54 ` [PATCH v2 26/88] ASoC: max98927: Convert to SYSTEM_SLEEP_PM_OPS() Takashi Iwai
2025-03-17  9:54 ` [PATCH v2 27/88] ASoC: mt6660: Convert to RUNTIME_PM_OPS() Takashi Iwai
2025-03-17  9:54 ` [PATCH v2 28/88] ASoC: pcm512x: Convert to EXPORT_GPL_DEV_PM_OPS() Takashi Iwai
2025-03-17  9:54 ` [PATCH v2 29/88] ASoC: rt1017-sdca-sdw: Convert to RUNTIME_PM_OPS() & co Takashi Iwai
2025-03-17  9:54 ` [PATCH v2 30/88] ASoC: rt1308-sdw: " Takashi Iwai
2025-03-17  9:54 ` [PATCH v2 31/88] ASoC: rt1316-sdw: " Takashi Iwai
2025-03-17  9:54 ` [PATCH v2 32/88] ASoC: rt1318-sdw: " Takashi Iwai
2025-03-17  9:54 ` [PATCH v2 33/88] ASoC: rt1320-sdw: " Takashi Iwai
2025-03-17  9:54 ` [PATCH v2 34/88] ASoC: rt5514: Convert to SYSTEM_SLEEP_PM_OPS() Takashi Iwai
2025-03-17  9:54 ` [PATCH v2 35/88] ASoC: rt5645: " Takashi Iwai
2025-03-17  9:54 ` [PATCH v2 36/88] ASoC: rt5682-sdw: Convert to RUNTIME_PM_OPS() & co Takashi Iwai
2025-03-17  9:54 ` [PATCH v2 37/88] ASoC: rt700-sdw: " Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 38/88] ASoC: rt711: " Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 39/88] ASoC: rt712: " Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 40/88] ASoC: rt715: " Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 41/88] ASoC: rt721: " Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 42/88] ASoC: rt722: " Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 43/88] ASoC: rt9120: Convert to RUNTIME_PM_OPS() Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 44/88] ASoC: rtq9128: " Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 45/88] ASoC: tas2552: " Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 46/88] ASoC: ts3a227e: Convert to SYSTEM_SLEEP_PM_OPS() Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 47/88] ASoC: wcd937x: Convert to RUNTIME_PM_OPS() Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 48/88] ASoC: wcd938x: " Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 49/88] ASoC: wcd939x: " Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 50/88] ASoC: wm2200: " Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 51/88] ASoC: wm5100: " Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 52/88] ASoC: wm8804: Convert to EXPORT_GPL_DEV_PM_OPS() Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 53/88] ASoC: wm8962: Convert to RUNTIME_PM_OPS() & co Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 54/88] ASoC: wm8994: Convert to SYSTEM_SLEEP_PM_OPS() Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 55/88] ASoC: wsa881x: Convert to RUNTIME_PM_OPS() Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 56/88] ASoC: wsa883x: " Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 57/88] ASoC: wsa884x: " Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 58/88] ASoC: dwc: " Takashi Iwai
2025-03-17  9:55 ` Takashi Iwai [this message]
2025-03-17  9:55 ` [PATCH v2 60/88] ASoC: img: Convert to RUNTIME_PM_OPS() and co Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 61/88] ASoC: intel: avs: Convert to RUNTIME_PM_OPS() Takashi Iwai
2025-03-17 10:04   ` Cezary Rojewski
2025-03-17  9:55 ` [PATCH v2 62/88] ASoC: intel: catpt: Convert to RUNTIME_PM_OPS() & co Takashi Iwai
2025-03-17 10:08   ` Cezary Rojewski
2025-03-17 10:13     ` Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 63/88] ASoC: mediatek: mt2701: Convert to RUNTIME_PM_OPS() Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 64/88] ASoC: mediatek: mt6797: " Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 65/88] ASoC: mediatek: mt7986: " Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 66/88] ASoC: mediatek: mt8173: " Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 67/88] ASoC: mediatek: mt8183: " Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 68/88] ASoC: mediatek: mt8186: " Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 69/88] ASoC: mediatek: mt8188: " Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 70/88] ASoC: mediatek: mt8192: " Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 71/88] ASoC: mediatek: mt8195: " Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 72/88] ASoC: mediatek: mt8365: Convert to RUNTIME_PM_OPS() & co Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 73/88] ASoC: qcom: Convert to SYSTEM_SLEEP_PM_OPS() Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 74/88] ASoC: rcar: " Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 75/88] ASoC: rockchip: Convert to RUNTIME_PM_OPS() & co Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 76/88] ASoC: samsung: " Takashi Iwai
2025-03-17 11:39   ` Sylwester Nawrocki
2025-03-17  9:55 ` [PATCH v2 77/88] ASoC: SOF: acpi: Convert to EXPORT_NS_DEV_PM_OPS() Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 78/88] ASoC: SOF: pci: " Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 79/88] ASoC: SOF: of: Convert to EXPORT_DEV_PM_OPS() Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 80/88] ASoC: stm: Convert to SYSTEM_SLEEP_PM_OPS() Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 81/88] ASoC: sunxi: Convert to RUNTIME_PM_OPS() Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 82/88] ASoC: tegra186: Convert to RUNTIME_PM_OPS() & co Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 83/88] ASoC: tegra210: " Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 84/88] ASoC: tegra20: " Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 85/88] ASoC: tegra30: " Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 86/88] ASoC: xtensa: Convert to RUNTIME_PM_OPS() Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 87/88] ASoC: amd: Convert to RUNTIME_PM_OPS() & co Takashi Iwai
2025-03-17  9:55 ` [PATCH v2 88/88] ASoC: pcm3168a: Convert to EXPORT_GPL_DEV_PM_OPS() Takashi Iwai
2025-03-17 21:54 ` [PATCH v2 00/88] ASoC: Convert to modern PM macros Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250317095603.20073-60-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=Xiubo.Lee@gmail.com \
    --cc=broonie@kernel.org \
    --cc=festevam@gmail.com \
    --cc=linux-sound@vger.kernel.org \
    --cc=nicoleotsuka@gmail.com \
    --cc=shengjiu.wang@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox