[PATCH 2/7] ASoC: nau8810: move nau8810_set_sysclk()
From: Mehmet Fide
Date: Thu Dec 03 2026 - 07:47:44 EST
From: Mehmet Fide <mehmet.fide@xxxxxxxxxxxxxxxxxx>
The next change calls nau8810_set_pll() from nau8810_set_sysclk(). Move
nau8810_set_sysclk() below nau8810_set_pll() to avoid a forward
declaration.
Signed-off-by: Mehmet Fide <mehmet.fide@xxxxxxxxxxxxxxxxxx>
---
sound/soc/codecs/nau8810.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/sound/soc/codecs/nau8810.c b/sound/soc/codecs/nau8810.c
index e18439c2b0e1..3ebef741f07a 100644
--- a/sound/soc/codecs/nau8810.c
+++ b/sound/soc/codecs/nau8810.c
@@ -512,20 +512,6 @@ static const struct snd_soc_dapm_route nau8810_dapm_routes[] = {
{"DAC", NULL, "Digital Loopback"},
};
-static int nau8810_set_sysclk(struct snd_soc_dai *dai,
- int clk_id, unsigned int freq, int dir)
-{
- struct snd_soc_component *component = dai->component;
- struct nau8810 *nau8810 = snd_soc_component_get_drvdata(component);
-
- nau8810->clk_id = clk_id;
- nau8810->sysclk = freq;
- dev_dbg(nau8810->dev, "master sysclk %dHz, source %s\n",
- freq, clk_id == NAU8810_SCLK_PLL ? "PLL" : "MCLK");
-
- return 0;
-}
-
static int nau8810_calc_pll(unsigned int pll_in,
unsigned int fs, struct nau8810_pll *pll_param)
{
@@ -605,6 +591,20 @@ static int nau8810_set_pll(struct snd_soc_dai *codec_dai, int pll_id,
return 0;
}
+static int nau8810_set_sysclk(struct snd_soc_dai *dai,
+ int clk_id, unsigned int freq, int dir)
+{
+ struct snd_soc_component *component = dai->component;
+ struct nau8810 *nau8810 = snd_soc_component_get_drvdata(component);
+
+ nau8810->clk_id = clk_id;
+ nau8810->sysclk = freq;
+ dev_dbg(nau8810->dev, "master sysclk %dHz, source %s\n",
+ freq, clk_id == NAU8810_SCLK_PLL ? "PLL" : "MCLK");
+
+ return 0;
+}
+
static int nau8810_set_dai_fmt(struct snd_soc_dai *codec_dai,
unsigned int fmt)
{
--
2.56.0