summaryrefslogtreecommitdiff
path: root/sound/soc/codecs
diff options
context:
space:
mode:
authorLuca Ceresoli <luca.ceresoli@bootlin.com>2024-04-03 14:03:18 +0300
committerMark Brown <broonie@kernel.org>2024-04-03 14:46:57 +0300
commit38d5387b7660476fd7e8e07d16ee436819e3544d (patch)
tree99d8dc20d1a7c2fecd68c150df4a5da9e4e1c8e0 /sound/soc/codecs
parent4ed0915f5bc4bcc81bca783a5b984f3d81e9764e (diff)
downloadlinux-38d5387b7660476fd7e8e07d16ee436819e3544d.tar.xz
ASoC: codecs: rk3308: fix "defined but not used" warning on !OF
Building with CONFIG_OF=n triggers: warning: 'rk3308_codec_of_match' defined but not used [-Wunused-const-variable=] warning: unused variable 'rk3308_codec_of_match' [-Wunused-const-variable] Even though OF is needed for probing, fix by declaring as __maybe_unused to still allow building on non-OF configurations for build testing. Fixes: 9fdd7b45da18 ("arm64: defconfig: enable Rockchip RK3308 internal audio codec driver") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202403271905.BYbGJiPi-lkp@intel.com/ Closes: https://lore.kernel.org/oe-kbuild-all/202403271907.0z0uuG5I-lkp@intel.com/ Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Link: https://msgid.link/r/20240403-rk3308-audio-codec-fix-warning-v2-1-816bae4c1dc5@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r--sound/soc/codecs/rk3308_codec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/rk3308_codec.c b/sound/soc/codecs/rk3308_codec.c
index 9d3e4691a7b5..74c3836995b1 100644
--- a/sound/soc/codecs/rk3308_codec.c
+++ b/sound/soc/codecs/rk3308_codec.c
@@ -953,7 +953,7 @@ static int rk3308_codec_platform_probe(struct platform_device *pdev)
return 0;
}
-static const struct of_device_id rk3308_codec_of_match[] = {
+static const struct of_device_id __maybe_unused rk3308_codec_of_match[] = {
{ .compatible = "rockchip,rk3308-codec", },
{},
};