提交 7722f830 编写于 作者: J Jean-Francois Moine 提交者: 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: NJean-Francois Moine <moinejf@free.fr>
Signed-off-by: NMark Brown <broonie@linaro.org>
上级 38dbfb59
......@@ -225,17 +225,17 @@ 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)) {
!cinfo->codec ||
!cinfo->platform ||
!cinfo->cpu_dai.name) {
dev_err(dev, "insufficient asoc_simple_card_info settings\n");
return -EINVAL;
}
}
/*
* init snd_soc_dai_link
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册