ASoC: cs42l43: Fix build error without CONFIG_PM
Subsystems (3)
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.
--- sound/soc/codecs/cs42l43.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
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);
Signature · 1 line
2.43.0
Quoted 3 lines · Takashi Iwai
Put
__maybe_unusedto work around the build error withoutCONFIG_PMorCONFIG_PM_SLEEPfor the newly defined system suspend callback.
I think a better alternative would be to wrap with pm_sleep_ptr(). Will resubmit.
Takashi
Quoted 9 lines · Takashi Iwai
Quoted 3 lines · Takashi Iwai
Put
__maybe_unusedto work around the build error withoutCONFIG_PMorCONFIG_PM_SLEEPfor 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
Quoted 2 lines · Takashi Iwai
Put
__maybe_unusedto work around the build error withoutCONFIG_PMorCONFIG_PM_SLEEPfor the newly defined system suspend callback.
I'm kind of surprised none of the build bot people noticed this...
Quoted 8 lines · Mark Brown
Quoted 2 lines · Takashi Iwai
Put
__maybe_unusedto work around the build error withoutCONFIG_PMorCONFIG_PM_SLEEPfor the newly defined system suspend callback.Reviewed-by Mark Brown <[email protected]>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
Quoted 14 lines · Takashi Iwai
Put
__maybe_unusedto work around the build error withoutCONFIG_PMorCONFIG_PM_SLEEPfor the newly defined system suspend callback.Fixes 164b7dd4546b ("ASoC: cs42l43: Add jack delay debounce after suspend")Signed-off-by Takashi Iwai <[email protected]>--- sound/soc/codecs/cs42l43.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)sound/soc/codecs/cs42l43.c +0
-0
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
Quoted 26 lines · Charles Keepax
Quoted 14 lines · Takashi Iwai
Put
__maybe_unusedto work around the build error withoutCONFIG_PMorCONFIG_PM_SLEEPfor the newly defined system suspend callback.Fixes 164b7dd4546b ("ASoC: cs42l43: Add jack delay debounce after suspend")Signed-off-by Takashi Iwai <[email protected]>--- sound/soc/codecs/cs42l43.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)sound/soc/codecs/cs42l43.c +0
-0sound/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