ASoC: davinci-mcasp: Change __davinci_mcasp_set_clkdiv() first parameter
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Mon, 9 May 2016 10:42:30 +0000 (13:42 +0300)
committerMark Brown <broonie@kernel.org>
Mon, 9 May 2016 15:55:16 +0000 (16:55 +0100)
Change the first parameter to struct davinci_mcasp* from
struct snd_soc_dai*
The function internally does not use or need the DAI information.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/davinci/davinci-mcasp.c

index adf1c3941f2359ed95b861acd255280fc18a5930..99061c4f3257e687d97ad9b349c3bd281e0030cb 100644 (file)
@@ -540,11 +540,9 @@ out:
        return ret;
 }
 
-static int __davinci_mcasp_set_clkdiv(struct snd_soc_dai *dai, int div_id,
+static int __davinci_mcasp_set_clkdiv(struct davinci_mcasp *mcasp, int div_id,
                                      int div, bool explicit)
 {
-       struct davinci_mcasp *mcasp = snd_soc_dai_get_drvdata(dai);
-
        pm_runtime_get_sync(mcasp->dev);
        switch (div_id) {
        case MCASP_CLKDIV_AUXCLK:                       /* MCLK divider */
@@ -592,7 +590,9 @@ static int __davinci_mcasp_set_clkdiv(struct snd_soc_dai *dai, int div_id,
 static int davinci_mcasp_set_clkdiv(struct snd_soc_dai *dai, int div_id,
                                    int div)
 {
-       return __davinci_mcasp_set_clkdiv(dai, div_id, div, 1);
+       struct davinci_mcasp *mcasp = snd_soc_dai_get_drvdata(dai);
+
+       return __davinci_mcasp_set_clkdiv(mcasp, div_id, div, 1);
 }
 
 static int davinci_mcasp_set_sysclk(struct snd_soc_dai *dai, int clk_id,
@@ -1056,7 +1056,7 @@ static int davinci_mcasp_hw_params(struct snd_pcm_substream *substream,
                        dev_info(mcasp->dev, "Sample-rate is off by %d PPM\n",
                                 ppm);
 
-               __davinci_mcasp_set_clkdiv(cpu_dai, 1, div, 0);
+               __davinci_mcasp_set_clkdiv(mcasp, 1, div, 0);
        }
 
        ret = mcasp_common_hw_param(mcasp, substream->stream,
This page took 0.034684 seconds and 5 git commands to generate.