diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2014-01-15 10:51:33 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-02-03 07:45:33 -0500 |
commit | 7722f830a45f7fbb8f2f7b23265793980bdf3397 (patch) | |
tree | 2474e86c4cfcbd64d9d262e44adb799b50dbc74f /sound/soc/generic | |
parent | 38dbfb59d1175ef458d006556061adeaa8751b72 (diff) |
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>
Diffstat (limited to 'sound/soc/generic')
-rw-r--r-- | sound/soc/generic/simple-card.c | 18 |
1 files 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) | |||
225 | 225 | ||
226 | memcpy(cinfo, dev->platform_data, sizeof(*cinfo)); | 226 | memcpy(cinfo, dev->platform_data, sizeof(*cinfo)); |
227 | cinfo->snd_card.dev = dev; | 227 | cinfo->snd_card.dev = dev; |
228 | } | ||
229 | 228 | ||
230 | if (!cinfo->name || | 229 | if (!cinfo->name || |
231 | !cinfo->card || | 230 | !cinfo->card || |
232 | !cinfo->codec_dai.name || | 231 | !cinfo->codec_dai.name || |
233 | !(cinfo->codec || of_codec) || | 232 | !cinfo->codec || |
234 | !(cinfo->platform || of_platform) || | 233 | !cinfo->platform || |
235 | !(cinfo->cpu_dai.name || of_cpu)) { | 234 | !cinfo->cpu_dai.name) { |
236 | dev_err(dev, "insufficient asoc_simple_card_info settings\n"); | 235 | dev_err(dev, "insufficient asoc_simple_card_info settings\n"); |
237 | return -EINVAL; | 236 | return -EINVAL; |
237 | } | ||
238 | } | 238 | } |
239 | 239 | ||
240 | /* | 240 | /* |