Skip to contentSkip to conversation

ASoC: cs42l43: Fix build error without CONFIG_PM

PATCH In review Takashi Iwai 3 participants 7 messages Mar 12, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: cs42l43: Fix build error without CONFIG_PM

Put __maybe_unused to work around the build error without CONFIG_PM or CONFIG_PM_SLEEP for the newly defined system suspend callback.

Fixes 164b7dd4546b ("ASoC: cs42l43: Add jack delay debounce after suspend")
---
 sound/soc/codecs/cs42l43.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/cs42l43.c +1 -1
index d307b56a7f38..4c7a598f5e73 100644
@@ -2402,7 +2402,7 @@ static int cs42l43_codec_runtime_resume(struct device *dev)
 	return 0;
 }
 
-static int cs42l43_codec_runtime_force_suspend(struct device *dev)
+static int __maybe_unused cs42l43_codec_runtime_force_suspend(struct device *dev)
 {
 	struct cs42l43_codec *priv = dev_get_drvdata(dev);
 
Signature · 1 line
2.43.0
#1 lore raw
Quoted 3 lines · Takashi Iwai

Put __maybe_unused to work around the build error without CONFIG_PM or CONFIG_PM_SLEEP for the newly defined system suspend callback.

I think a better alternative would be to wrap with pm_sleep_ptr(). Will resubmit.

Takashi

#2 lore raw
Quoted 9 lines · Takashi Iwai
Quoted 3 lines · Takashi Iwai

Put __maybe_unused to work around the build error without CONFIG_PM or CONFIG_PM_SLEEP for the newly defined system suspend callback.

I think a better alternative would be to wrap with pm_sleep_ptr(). Will resubmit.

... and no, it won't work together with SET_SYSTEM_SLEEP_PM_OPS() :-<

So this patch should be the easiest fix, I suppose.

Takashi

maintainer Reviewed-by on v1 1/1
#3 lore raw
In reply to Takashi Iwai
Quoted 2 lines · Takashi Iwai

Put __maybe_unused to work around the build error without CONFIG_PM or CONFIG_PM_SLEEP for the newly defined system suspend callback.

I'm kind of surprised none of the build bot people noticed this...

#4 lore raw
Quoted 8 lines · Mark Brown
Quoted 2 lines · Takashi Iwai

Put __maybe_unused to work around the build error without CONFIG_PM or CONFIG_PM_SLEEP for the newly defined system suspend callback.

I'm kind of surprised none of the build bot people noticed this...

Would you just apply and send a new PR later?
I didn't merge your previous PR yet.

thanks,

Takashi

#5 lore raw
In reply to Takashi Iwai
Quoted 14 lines · Takashi Iwai

Put __maybe_unused to work around the build error without CONFIG_PM or CONFIG_PM_SLEEP for the newly defined system suspend callback.

Fixes 164b7dd4546b ("ASoC: cs42l43: Add jack delay debounce after suspend")
---
 sound/soc/codecs/cs42l43.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/cs42l43.c +0 -0
index d307b56a7f38..4c7a598f5e73 100644

sound/soc/codecs/cs42l43.c static int cs42l43_codec_runtime_resume(struct device *dev) · line 2407

Quoted 7 lines
sound/soc/codecs/cs42l43.c +1 -1
@@ -2402,7 +2402,7 @@ static int cs42l43_codec_runtime_resume(struct device *dev)
 	return 0;
 }
 
-static int cs42l43_codec_runtime_force_suspend(struct device *dev)
+static int __maybe_unused cs42l43_codec_runtime_force_suspend(struct device *dev)
 {
 	struct cs42l43_codec *priv = dev_get_drvdata(dev);

I believe this should already be fixed by this patch:

https://patch.msgid.link/[email protected]

Which is probably a better fix as well.

Thanks,
Charles

#6 lore raw
Quoted 26 lines · Charles Keepax
Quoted 14 lines · Takashi Iwai

Put __maybe_unused to work around the build error without CONFIG_PM or CONFIG_PM_SLEEP for the newly defined system suspend callback.

Fixes 164b7dd4546b ("ASoC: cs42l43: Add jack delay debounce after suspend")
---
 sound/soc/codecs/cs42l43.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/cs42l43.c +0 -0
index d307b56a7f38..4c7a598f5e73 100644

sound/soc/codecs/cs42l43.c static int cs42l43_codec_runtime_resume(struct device *dev) · line 2407

Quoted 7 lines
sound/soc/codecs/cs42l43.c +1 -1
@@ -2402,7 +2402,7 @@ static int cs42l43_codec_runtime_resume(struct device *dev)
 	return 0;
 }
 
-static int cs42l43_codec_runtime_force_suspend(struct device *dev)
+static int __maybe_unused cs42l43_codec_runtime_force_suspend(struct device *dev)
 {
 	struct cs42l43_codec *priv = dev_get_drvdata(dev);

I believe this should already be fixed by this patch:

Quoted 3 lines

https://patch.msgid.link/[email protected]

Which is probably a better fix as well.

Ah that's the one I looked for. Yes, SYSTEM_SLEEP_PM_OPS() is a better choice.

thanks,

Takashi