| From 9ae721191b07d3c659d1c2a0dc8df9da6fa637fc Mon Sep 17 00:00:00 2001 |
| From: Jean-Francois Moine <moinejf@free.fr> |
| Date: Wed, 15 Jan 2014 16:51:33 +0100 |
| Subject: ASoC: simple-card: simplify code |
| |
| 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> |
| Signed-off-by: Mark Brown <broonie@linaro.org> |
| (cherry picked from commit 7722f830a45f7fbb8f2f7b23265793980bdf3397) |
| Signed-off-by: Simon Horman <horms+renesas@verge.net.au> |
| --- |
| 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 2a1b1b5b5221..f0784ca4d3c8 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; |
| + } |
| } |
| |
| /* |
| -- |
| 2.1.2 |
| |