Commit 080aaf10 authored by Kirill Marinushkin's avatar Kirill Marinushkin Committed by Mark Brown

ASoC: pcm3060: Improve legibility of if-statements

Modified some if-statements to make them more clear
Signed-off-by: default avatarKirill Marinushkin <kmarinushkin@birdec.tech>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent aec785f6
...@@ -68,7 +68,10 @@ static int pcm3060_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) ...@@ -68,7 +68,10 @@ static int pcm3060_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
return -EINVAL; return -EINVAL;
} }
reg = (dai->id == PCM3060_DAI_ID_DAC ? PCM3060_REG67 : PCM3060_REG72); if (dai->id == PCM3060_DAI_ID_DAC)
reg = PCM3060_REG67;
else
reg = PCM3060_REG72;
regmap_update_bits(priv->regmap, reg, PCM3060_REG_MASK_FMT, val); regmap_update_bits(priv->regmap, reg, PCM3060_REG_MASK_FMT, val);
...@@ -124,7 +127,10 @@ static int pcm3060_hw_params(struct snd_pcm_substream *substream, ...@@ -124,7 +127,10 @@ static int pcm3060_hw_params(struct snd_pcm_substream *substream,
} }
val_ready: val_ready:
reg = (dai->id == PCM3060_DAI_ID_DAC ? PCM3060_REG67 : PCM3060_REG72); if (dai->id == PCM3060_DAI_ID_DAC)
reg = PCM3060_REG67;
else
reg = PCM3060_REG72;
regmap_update_bits(priv->regmap, reg, PCM3060_REG_MASK_MS, val); regmap_update_bits(priv->regmap, reg, PCM3060_REG_MASK_MS, val);
......
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