]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda: cs35l41: Fix build error unused-function
authorRen Zhijie <renzhijie2@huawei.com>
Mon, 25 Jul 2022 02:36:11 +0000 (10:36 +0800)
committerTakashi Iwai <tiwai@suse.de>
Mon, 25 Jul 2022 06:32:16 +0000 (08:32 +0200)
commit568d4f22c7242ed1a32c18d7c25f3f887126c717
tree40f22e71928c796dd441e5b0cd4131afe06656b1
parent9a9f4a30d448dc4b0a2511af80b4613c45f5fdc6
ALSA: hda: cs35l41: Fix build error unused-function

If CONFIG_PM_SLEEP is not set,
make ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu-, will be failed, like this:

sound/pci/hda/cs35l41_hda.c:583:12: error: ‘cs35l41_runtime_resume’ defined but not used [-Werror=unused-function]
 static int cs35l41_runtime_resume(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~~~~
sound/pci/hda/cs35l41_hda.c:565:12: error: ‘cs35l41_runtime_suspend’ defined but not used [-Werror=unused-function]
 static int cs35l41_runtime_suspend(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[3]: *** [sound/pci/hda/cs35l41_hda.o] Error 1

commit 6db8f172411e ("PM: core: Add new *_PM_OPS macros,
deprecate old ones"), add new marco RUNTIME_PM_OPS to fix this unused-function problem.

Fixes: 73bdec1f5f5c ("ALSA: hda: cs35l41: Support Hibernation during Suspend")
Signed-off-by: Ren Zhijie <renzhijie2@huawei.com>
Link: https://lore.kernel.org/r/20220725023611.57055-1-renzhijie2@huawei.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/cs35l41_hda.c