summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/max9867.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2016-02-23 09:53:13 +0300
committerMark Brown <broonie@kernel.org>2016-02-24 07:07:11 +0300
commit9dcc72efae313472d1d719e91b23e2bea3513789 (patch)
tree90d4d0b67df44544f3ebd54d15a3babd10491637 /sound/soc/codecs/max9867.c
parent127a9cbb5860a7cf15f4d4703ab0454e4603e8ac (diff)
downloadlinux-9dcc72efae313472d1d719e91b23e2bea3513789.tar.xz
ASoC: max9867: Use params_width instead of open-coded
Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: anish kumar <yesanishhere@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/max9867.c')
-rwxr-xr-xsound/soc/codecs/max9867.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/soc/codecs/max9867.c b/sound/soc/codecs/max9867.c
index 4fb6fc7188c7..f371a52fe29d 100755
--- a/sound/soc/codecs/max9867.c
+++ b/sound/soc/codecs/max9867.c
@@ -207,10 +207,9 @@ static int max9867_dai_hw_params(struct snd_pcm_substream *substream,
unsigned long int bclk_rate, pclk_bclk_ratio;
int bclk_value;
- bclk_rate = params_rate(params) * 2 *
- snd_pcm_format_width(params_format(params));
+ bclk_rate = params_rate(params) * 2 * params_width(params);
pclk_bclk_ratio = max9867->pclk/bclk_rate;
- switch (snd_pcm_format_width(params_format(params))) {
+ switch (params_width(params)) {
case 8:
case 16:
switch (pclk_bclk_ratio) {