diff options
author | Maxime Ripard <maxime.ripard@bootlin.com> | 2019-08-19 15:25:10 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-08-20 13:25:59 -0400 |
commit | c7dd0828c088a71f30de8d249f63b2fa9f0d322d (patch) | |
tree | ffe81e01f8f9192b26812387c480cb2a9cc6df04 /sound | |
parent | 7df8f9a20196072162d9dc8fe99943f2d35f23d5 (diff) |
ASoC: sun4i-i2s: Replace call to params_channels by local variable
The sun4i_i2s_hw_params already has a variable holding the value returned
by params_channels, so let's just use that variable instead of calling
params_channels multiple times.
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://lore.kernel.org/r/c0faaac69ad40248f24eed3c3b2fa1ccc4a85b70.1566242458.git-series.maxime.ripard@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/sunxi/sun4i-i2s.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index d879db581073..77b7b81daf74 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c | |||
@@ -412,10 +412,9 @@ static int sun4i_i2s_hw_params(struct snd_pcm_substream *substream, | |||
412 | 412 | ||
413 | /* Configure the channels */ | 413 | /* Configure the channels */ |
414 | regmap_field_write(i2s->field_txchansel, | 414 | regmap_field_write(i2s->field_txchansel, |
415 | SUN4I_I2S_CHAN_SEL(params_channels(params))); | 415 | SUN4I_I2S_CHAN_SEL(channels)); |
416 | |||
417 | regmap_field_write(i2s->field_rxchansel, | 416 | regmap_field_write(i2s->field_rxchansel, |
418 | SUN4I_I2S_CHAN_SEL(params_channels(params))); | 417 | SUN4I_I2S_CHAN_SEL(channels)); |
419 | 418 | ||
420 | if (i2s->variant->has_chsel_tx_chen) | 419 | if (i2s->variant->has_chsel_tx_chen) |
421 | regmap_update_bits(i2s->regmap, SUN8I_I2S_TX_CHAN_SEL_REG, | 420 | regmap_update_bits(i2s->regmap, SUN8I_I2S_TX_CHAN_SEL_REG, |