Skip to content

Commit

Permalink
ASoC: sun4i-i2s: Replace call to params_width by local variable
Browse files Browse the repository at this point in the history
The sun4i_i2s_hw_params function already has a variable holding the value
returned by params_width, so let's just use that variable instead of
calling params_width multiple times.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://lore.kernel.org/r/f85a1c1e014080a4bbc3abd19bc8fdcb86f0981a.1566392800.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 21, 2019
1 parent 9e8a93a commit 84884c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/sunxi/sun4i-i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ static int sun4i_i2s_hw_params(struct snd_pcm_substream *substream,
}
i2s->playback_dma_data.addr_width = width;

sr = i2s->variant->get_sr(i2s, params_width(params));
sr = i2s->variant->get_sr(i2s, word_size);
if (sr < 0)
return -EINVAL;

Expand Down

0 comments on commit 84884c7

Please sign in to comment.