Commit 7722f830 authored by Jean-Francois Moine's avatar Jean-Francois Moine Committed by Mark Brown

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: default avatarJean-Francois Moine <moinejf@free.fr>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 38dbfb59
...@@ -225,17 +225,17 @@ static int asoc_simple_card_probe(struct platform_device *pdev) ...@@ -225,17 +225,17 @@ static int asoc_simple_card_probe(struct platform_device *pdev)
memcpy(cinfo, dev->platform_data, sizeof(*cinfo)); memcpy(cinfo, dev->platform_data, sizeof(*cinfo));
cinfo->snd_card.dev = dev; cinfo->snd_card.dev = dev;
}
if (!cinfo->name || if (!cinfo->name ||
!cinfo->card || !cinfo->card ||
!cinfo->codec_dai.name || !cinfo->codec_dai.name ||
!(cinfo->codec || of_codec) || !cinfo->codec ||
!(cinfo->platform || of_platform) || !cinfo->platform ||
!(cinfo->cpu_dai.name || of_cpu)) { !cinfo->cpu_dai.name) {
dev_err(dev, "insufficient asoc_simple_card_info settings\n"); dev_err(dev, "insufficient asoc_simple_card_info settings\n");
return -EINVAL; return -EINVAL;
} }
}
/* /*
* init snd_soc_dai_link * init snd_soc_dai_link
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment