Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: dwc: i2s: Fix unused functions

A few newly added functions aren't built unless CONFIG_OF is set,
which result in the build failure due to defined-but-not-used errors.

Put "#ifdef CONFIG_OF" around those functions to suppress the build
error.

Fixes: 52ea7c0543f8 ("ASoC: dwc: i2s: Add StarFive JH7110 SoC support")
Link: https://lore.kernel.org/r/20230828113537.27600-1-tiwai@suse.de
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

+2
+2
sound/soc/dwc/dwc-i2s.c
··· 729 729 730 730 } 731 731 732 + #ifdef CONFIG_OF 732 733 /* clocks initialization with master mode on JH7110 SoC */ 733 734 static int jh7110_i2s_crg_master_init(struct dw_i2s_dev *dev) 734 735 { ··· 913 912 914 913 return clk_set_rate(dev->clk, bclk_rate); 915 914 } 915 + #endif /* CONFIG_OF */ 916 916 917 917 static int dw_i2s_probe(struct platform_device *pdev) 918 918 {