summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/pcm3060.c
diff options
context:
space:
mode:
authorKirill Marinushkin <kmarinushkin@birdec.tech>2018-08-28 23:42:31 +0200
committerMark Brown <broonie@kernel.org>2018-08-29 12:31:07 +0100
commit080aaf10892eec4b359126473e582f62ebb09496 (patch)
tree160acf3a03ba6f0d5ca7bf80dd0855fb169459e3 /sound/soc/codecs/pcm3060.c
parentaec785f6a0dcd68c3d2ad4a7d5b48d5fc94d75e8 (diff)
ASoC: pcm3060: Improve legibility of if-statements
Modified some if-statements to make them more clear Signed-off-by: Kirill Marinushkin <kmarinushkin@birdec.tech> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/pcm3060.c')
-rw-r--r--sound/soc/codecs/pcm3060.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sound/soc/codecs/pcm3060.c b/sound/soc/codecs/pcm3060.c
index 5b9718fa766d..494d9d662be8 100644
--- a/sound/soc/codecs/pcm3060.c
+++ b/sound/soc/codecs/pcm3060.c
@@ -68,7 +68,10 @@ static int pcm3060_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
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);
@@ -124,7 +127,10 @@ static int pcm3060_hw_params(struct snd_pcm_substream *substream,
}
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);