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

ASoC: Intel: rename shadowed variable for all broadwell boards

Fix cppcheck warnings:

sound/soc/intel/boards/bdw-rt5650.c:91:23: style: Local variable
'channels' shadows outer variable [shadowVariable]

sound/soc/intel/boards/bdw-rt5677.c:144:23: style: Local variable
'channels' shadows outer variable [shadowVariable]

sound/soc/intel/boards/broadwell.c:91:23: style: Local variable
'channels' shadows outer variable [shadowVariable]

This was fixed earlier in other machine drivers but keeps coming back
with copy/paste.
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200813175839.59422-4-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 2e3e0bc3
...@@ -88,13 +88,13 @@ static int broadwell_ssp0_fixup(struct snd_soc_pcm_runtime *rtd, ...@@ -88,13 +88,13 @@ static int broadwell_ssp0_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);
/* The ADSP will covert the FE rate to 48k, max 4-channels */ /* The ADSP will covert the FE rate to 48k, max 4-channels */
rate->min = rate->max = 48000; rate->min = rate->max = 48000;
channels->min = 2; chan->min = 2;
channels->max = 4; chan->max = 4;
/* set SSP0 to 24 bit */ /* set SSP0 to 24 bit */
snd_mask_set_format(hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT), snd_mask_set_format(hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT),
......
...@@ -141,12 +141,12 @@ static int broadwell_ssp0_fixup(struct snd_soc_pcm_runtime *rtd, ...@@ -141,12 +141,12 @@ static int broadwell_ssp0_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);
/* 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 16 bit */ /* set SSP0 to 16 bit */
params_set_format(params, SNDRV_PCM_FORMAT_S16_LE); params_set_format(params, SNDRV_PCM_FORMAT_S16_LE);
......
...@@ -88,12 +88,12 @@ static int broadwell_ssp0_fixup(struct snd_soc_pcm_runtime *rtd, ...@@ -88,12 +88,12 @@ static int broadwell_ssp0_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);
/* 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 16 bit */ /* set SSP0 to 16 bit */
params_set_format(params, SNDRV_PCM_FORMAT_S16_LE); params_set_format(params, SNDRV_PCM_FORMAT_S16_LE);
......
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