diff options
author | Cristian Ciocaltea <cristian.ciocaltea@collabora.com> | 2023-09-07 20:10:07 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-09-11 15:34:39 +0300 |
commit | 611b8813a28f49e206e05198dae77c544c72b050 (patch) | |
tree | fc3db1c97ec39a22ba87d42763aaeecc7f5c9e0b /sound/soc/codecs/cs35l41-spi.c | |
parent | 3db52739aca981a436536423a36ab59b9f241096 (diff) | |
download | linux-611b8813a28f49e206e05198dae77c544c72b050.tar.xz |
ASoC: cs35l41: Use modern pm_ops
Make use of the recently introduced EXPORT_GPL_DEV_PM_OPS() macro, to
conditionally export the runtime/system PM functions.
Replace the old SET_{RUNTIME,SYSTEM_SLEEP,NOIRQ_SYSTEM_SLEEP}_PM_OPS()
helpers with their modern alternatives and get rid of the now
unnecessary '__maybe_unused' annotations on all PM functions.
Additionally, use the pm_ptr() macro to fix the following errors when
building with CONFIG_PM disabled:
ERROR: modpost: "cs35l41_pm_ops" [sound/soc/codecs/snd-soc-cs35l41-spi.ko] undefined!
ERROR: modpost: "cs35l41_pm_ops" [sound/soc/codecs/snd-soc-cs35l41-i2c.ko] undefined!
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20230907171010.1447274-9-cristian.ciocaltea@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/cs35l41-spi.c')
-rw-r--r-- | sound/soc/codecs/cs35l41-spi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/cs35l41-spi.c b/sound/soc/codecs/cs35l41-spi.c index 28e9c9473e60..a6db44520c06 100644 --- a/sound/soc/codecs/cs35l41-spi.c +++ b/sound/soc/codecs/cs35l41-spi.c @@ -80,7 +80,7 @@ MODULE_DEVICE_TABLE(acpi, cs35l41_acpi_match); static struct spi_driver cs35l41_spi_driver = { .driver = { .name = "cs35l41", - .pm = &cs35l41_pm_ops, + .pm = pm_ptr(&cs35l41_pm_ops), .of_match_table = of_match_ptr(cs35l41_of_match), .acpi_match_table = ACPI_PTR(cs35l41_acpi_match), }, |