summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2014-01-15 16:51:33 +0100
committerDarren Etheridge <detheridge@ti.com>2014-06-20 15:13:45 -0500
commit7d48c7f72a051eb32f4f4b4984896eb1bfdb313e (patch)
tree65bb266783496a7428c6024ad8562408048866ad /sound
parent06887336fb5f8e1dc39f8778adaff692c0d9a79c (diff)
ASoC: simple-card: simplify code
[ Upstream commit b367a3252b365fd545fc589a40cad3976e73d7d7 45fce59496cbabd46761e6980c05c82d94d08eaa ca65b492c7a265b220f763fd68bf87391213248f 520084729267ac8df1651ad2f118a1d4a631a10a 5ca8ba4180a6f629d51dba699b4a6428cc5eeba7 201a0eac7fe5e7a8fa33f0742304f885bc344d0d 2bee991460a838ee3c8064a6d880c4e7bc41717a 7722f830a45f7fbb8f2f7b23265793980bdf3397 ] 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> Signed-off-by: Darren Etheridge <detheridge@ti.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/generic/simple-card.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index 2a1b1b5b522..f0784ca4d3c 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;
+ }
}
/*