linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Harisangam, Sharvari (S.)" <sharvari.harisangam@visteon.com>
To: Timur Tabi <timur@tabi.org>,
	Nicolin Chen <nicoleotsuka@gmail.com>,
	"Xiubo Li" <Xiubo.Lee@gmail.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.de>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [PATCH]  ASoC : fsl_ssi : Correct the condition to check AC97 mode
Date: Wed, 28 Dec 2016 11:06:44 +0000	[thread overview]
Message-ID: <20161228110636.GA14768@ubuntu> (raw)

 Corrected the condition to check if ssi is configured for AC97
 mode. Other modes like dsp_a also satisfy the ANDing condition.

Signed-off-by: Sharvari Harisangam <sharvari.harisangam@visteon.com>
---
 sound/soc/fsl/fsl_ssi.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index ca6f6b1..4fbb7a2 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -317,7 +317,8 @@ MODULE_DEVICE_TABLE(of, fsl_ssi_ids);
=20
 static bool fsl_ssi_is_ac97(struct fsl_ssi_private *ssi_private)
 {
-	return !!(ssi_private->dai_fmt & SND_SOC_DAIFMT_AC97);
+	return !!(ssi_private->dai_fmt & SND_SOC_DAIFMT_AC97) =3D=3D
+		SND_SOC_DAIFMT_AC97;
 }
=20
 static bool fsl_ssi_is_i2s_master(struct fsl_ssi_private *ssi_private)
@@ -1016,7 +1017,7 @@ static int _fsl_ssi_set_dai_fmt(struct device *dev,
 				CCSR_SSI_SCR_TCH_EN);
 	}
=20
-	if (fmt & SND_SOC_DAIFMT_AC97)
+	if ((fmt & SND_SOC_DAIFMT_AC97) =3D=3D SND_SOC_DAIFMT_AC97)
 		fsl_ssi_setup_ac97(ssi_private);
=20
 	return 0;
--=20
2.7.4

             reply	other threads:[~2016-12-28 11:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-28 11:06 Harisangam, Sharvari (S.) [this message]
2016-12-28 14:50 ` [PATCH] ASoC : fsl_ssi : Correct the condition to check AC97 mode Andreas Schwab
2016-12-28 15:48   ` Timur Tabi
2016-12-28 15:53   ` Harisangam, Sharvari (S.)
     [not found]   ` <9ebb798c-6040-9262-9625-ddcebd05a188__32955.7460187518$1482940206$gmane$org@tabi.org>
2016-12-28 16:52     ` Andreas Schwab
2016-12-28 17:53 ` [alsa-devel] " Fabio Estevam
2017-01-04 12:22 ` David Laight

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=20161228110636.GA14768@ubuntu \
    --to=sharvari.harisangam@visteon.com \
    --cc=Xiubo.Lee@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=nicoleotsuka@gmail.com \
    --cc=perex@perex.cz \
    --cc=timur@tabi.org \
    --cc=tiwai@suse.de \
    /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).