linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kirill Marinushkin <kmarinushkin@birdec.tech>
To: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	M R Swami Reddy <mr.swami.reddy@ti.com>,
	Vishwas A Deshpande <vishwas.a.deshpande@ti.com>,
	Kevin Cernekee <cernekee@chromium.org>,
	Peter Ujfalusi <peter.ujfalusi@ti.com>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	Kirill Marinushkin <kmarinushkin@birdec.tech>
Subject: [PATCH 2/2] ASoC: pcm3060: Improve legibility of if-statements
Date: Tue, 28 Aug 2018 23:42:31 +0200	[thread overview]
Message-ID: <20180828214231.10164-2-kmarinushkin@birdec.tech> (raw)
In-Reply-To: <20180828214231.10164-1-kmarinushkin@birdec.tech>

Modified some if-statements to make them more clear

Signed-off-by: Kirill Marinushkin <kmarinushkin@birdec.tech>
Cc: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org
Cc: linux-kernel@vger.kernel.org
---
 sound/soc/codecs/pcm3060.c | 10 ++++++++--
 1 file 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);
 
-- 
2.13.6


  reply	other threads:[~2018-08-28 21:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-21 16:52 [PATCH 0/1] ASoC: pcm3060: Add codec driver Kirill Marinushkin
2018-08-21 16:52 ` [PATCH 1/1] " Kirill Marinushkin
2018-08-28 19:40   ` Mark Brown
2018-08-28 21:42     ` [PATCH 1/2] ASoC: pcm3060: Improve stylistics of file comments Kirill Marinushkin
2018-08-28 21:42       ` Kirill Marinushkin [this message]
2018-08-29 11:31         ` Applied "ASoC: pcm3060: Improve legibility of if-statements" to the asoc tree Mark Brown
2018-08-29 11:31       ` Applied "ASoC: pcm3060: Improve stylistics of file comments" " Mark Brown
2018-08-28 20:28   ` Applied "ASoC: pcm3060: Add codec driver" " Mark Brown
2018-08-28 19:31 ` [PATCH 0/1] ASoC: pcm3060: Add codec driver Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180828214231.10164-2-kmarinushkin@birdec.tech \
    --to=kmarinushkin@birdec.tech \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=cernekee@chromium.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mr.swami.reddy@ti.com \
    --cc=perex@perex.cz \
    --cc=peter.ujfalusi@ti.com \
    --cc=tiwai@suse.com \
    --cc=vishwas.a.deshpande@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).