Skip to content

Commit 8d2a0cd

Browse files
committed
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: 52ea7c0 ("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>
1 parent 692f551 commit 8d2a0cd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sound/soc/dwc/dwc-i2s.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,7 @@ static int dw_configure_dai_by_dt(struct dw_i2s_dev *dev,
729729

730730
}
731731

732+
#ifdef CONFIG_OF
732733
/* clocks initialization with master mode on JH7110 SoC */
733734
static int jh7110_i2s_crg_master_init(struct dw_i2s_dev *dev)
734735
{
@@ -912,6 +913,7 @@ static int jh7110_i2stx0_clk_cfg(struct i2s_clk_config_data *config)
912913

913914
return clk_set_rate(dev->clk, bclk_rate);
914915
}
916+
#endif /* CONFIG_OF */
915917

916918
static int dw_i2s_probe(struct platform_device *pdev)
917919
{

0 commit comments

Comments
 (0)