Skip to content

Commit

Permalink
ASoC: sun4i-i2s: Replace call to params_channels by local variable
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Maxime Ripard authored and Mark Brown committed Aug 20, 2019
1 parent 7df8f9a commit c7dd082
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sound/soc/sunxi/sun4i-i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,10 +412,9 @@ static int sun4i_i2s_hw_params(struct snd_pcm_substream *substream,

/* Configure the channels */
regmap_field_write(i2s->field_txchansel,
SUN4I_I2S_CHAN_SEL(params_channels(params)));

SUN4I_I2S_CHAN_SEL(channels));
regmap_field_write(i2s->field_rxchansel,
SUN4I_I2S_CHAN_SEL(params_channels(params)));
SUN4I_I2S_CHAN_SEL(channels));

if (i2s->variant->has_chsel_tx_chen)
regmap_update_bits(i2s->regmap, SUN8I_I2S_TX_CHAN_SEL_REG,
Expand Down

0 comments on commit c7dd082

Please sign in to comment.