public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jean-Francois Moine <moinejf@free.fr>
To: Mark Brown <broonie@kernel.org>, lgirdwood@gmail.com
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	kuninori.morimoto.gx@renesas.com,
	Xiubo Li <Li.Xiubo@freescale.com>
Subject: [PATCH v2 1/8] ASoC: simple-card: simplify code
Date: Wed, 15 Jan 2014 16:51:33 +0100	[thread overview]
Message-ID: <20140115165133.507595c9@armhf> (raw)
In-Reply-To: <20140115113551.0eb13409@armhf>

The check of the mandatory fields is done for DT in its specific sequence.
Move the global check to the non-DT sequence.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
---
 sound/soc/generic/simple-card.c      | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index 2a1b1b5..f0784ca 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -225,16 +225,16 @@ static int asoc_simple_card_probe(struct platform_device *pdev)
 
 		memcpy(cinfo, dev->platform_data, sizeof(*cinfo));
 		cinfo->snd_card.dev = dev;
-	}
 
-	if (!cinfo->name	||
-	    !cinfo->card	||
-	    !cinfo->codec_dai.name	||
-	    !(cinfo->codec		|| of_codec)	||
-	    !(cinfo->platform		|| of_platform)	||
-	    !(cinfo->cpu_dai.name	|| of_cpu)) {
-		dev_err(dev, "insufficient asoc_simple_card_info settings\n");
-		return -EINVAL;
+		if (!cinfo->name	||
+		    !cinfo->card	||
+		    !cinfo->codec_dai.name	||
+		    !cinfo->codec	||
+		    !cinfo->platform	||
+		    !cinfo->cpu_dai.name) {
+			dev_err(dev, "insufficient asoc_simple_card_info settings\n");
+			return -EINVAL;
+		}
 	}
 
 	/*
-- 
Ken ar c'hentañ	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/

       reply	other threads:[~2014-01-15 15:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20140115113551.0eb13409@armhf>
2014-01-15 15:51 ` Jean-Francois Moine [this message]
2014-01-22 19:04   ` [PATCH v2 1/8] ASoC: simple-card: simplify code Mark Brown
2014-01-15 15:51 ` [PATCH v2 2/8] " Jean-Francois Moine
2014-01-22 19:06   ` Mark Brown
2014-01-15 15:51 ` [PATCH v2 3/8] " Jean-Francois Moine
2014-01-22 19:25   ` Mark Brown
2014-01-15 15:51 ` [PATCH v2 4/8] " Jean-Francois Moine
2014-01-22 19:26   ` Mark Brown
2014-01-15 15:51 ` [PATCH v2 5/8] " Jean-Francois Moine
2014-01-22 19:42   ` Mark Brown
2014-01-15 15:51 ` [PATCH v2 6/8] " Jean-Francois Moine
2014-01-22 20:05   ` Mark Brown
2014-01-15 15:51 ` [PATCH v2 7/8] " Jean-Francois Moine
2014-01-22 20:06   ` Mark Brown
2014-01-15 15:52 ` [PATCH v2 8/8] " Jean-Francois Moine
2014-01-22 20:06   ` 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=20140115165133.507595c9@armhf \
    --to=moinejf@free.fr \
    --cc=Li.Xiubo@freescale.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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