Commit ddce36af authored by Pierre-Louis Bossart's avatar Pierre-Louis Bossart Committed by Mark Brown

ASoC: Intel: skl_nau88l25_ssm4567: rename shadowed variable

Fix cppcheck warning

[sound/soc/intel/boards/skl_nau88l25_ssm4567.c:277] ->
[sound/soc/intel/boards/skl_nau88l25_ssm4567.c:320]: (style) Local
variable 'channels' shadows outer variable

[sound/soc/intel/boards/skl_nau88l25_ssm4567.c:277] ->
[sound/soc/intel/boards/skl_nau88l25_ssm4567.c:337]: (style) Local
variable 'channels' shadows outer variable
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200113210428.27457-15-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 119cc784
...@@ -317,13 +317,13 @@ static int skylake_ssp_fixup(struct snd_soc_pcm_runtime *rtd, ...@@ -317,13 +317,13 @@ static int skylake_ssp_fixup(struct snd_soc_pcm_runtime *rtd,
{ {
struct snd_interval *rate = hw_param_interval(params, struct snd_interval *rate = hw_param_interval(params,
SNDRV_PCM_HW_PARAM_RATE); SNDRV_PCM_HW_PARAM_RATE);
struct snd_interval *channels = hw_param_interval(params, struct snd_interval *chan = hw_param_interval(params,
SNDRV_PCM_HW_PARAM_CHANNELS); SNDRV_PCM_HW_PARAM_CHANNELS);
struct snd_mask *fmt = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT); struct snd_mask *fmt = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
/* The ADSP will covert the FE rate to 48k, stereo */ /* The ADSP will covert the FE rate to 48k, stereo */
rate->min = rate->max = 48000; rate->min = rate->max = 48000;
channels->min = channels->max = 2; chan->min = chan->max = 2;
/* set SSP0 to 24 bit */ /* set SSP0 to 24 bit */
snd_mask_none(fmt); snd_mask_none(fmt);
...@@ -334,12 +334,12 @@ static int skylake_ssp_fixup(struct snd_soc_pcm_runtime *rtd, ...@@ -334,12 +334,12 @@ static int skylake_ssp_fixup(struct snd_soc_pcm_runtime *rtd,
static int skylake_dmic_fixup(struct snd_soc_pcm_runtime *rtd, static int skylake_dmic_fixup(struct snd_soc_pcm_runtime *rtd,
struct snd_pcm_hw_params *params) struct snd_pcm_hw_params *params)
{ {
struct snd_interval *channels = hw_param_interval(params, struct snd_interval *chan = hw_param_interval(params,
SNDRV_PCM_HW_PARAM_CHANNELS); SNDRV_PCM_HW_PARAM_CHANNELS);
if (params_channels(params) == 2 || DMIC_CH(dmic_constraints) == 2) if (params_channels(params) == 2 || DMIC_CH(dmic_constraints) == 2)
channels->min = channels->max = 2; chan->min = chan->max = 2;
else else
channels->min = channels->max = 4; chan->min = chan->max = 4;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment