summaryrefslogtreecommitdiffstats
path: root/sound/soc/generic/simple-card-utils.c
diff options
context:
space:
mode:
authorKuninori Morimoto2017-05-25 03:51:31 +0200
committerMark Brown2017-05-26 13:40:53 +0200
commit155b8f3aa633dbce887cded6b6b9399a3c62683e (patch)
treebcde89d364fb4713b42d164b53512d8ba3b7c946 /sound/soc/generic/simple-card-utils.c
parentASoC: simple-card-utils: support snd_soc_get_dai_id() (diff)
downloadkernel-qcow2-linux-155b8f3aa633dbce887cded6b6b9399a3c62683e.tar.gz
kernel-qcow2-linux-155b8f3aa633dbce887cded6b6b9399a3c62683e.tar.xz
kernel-qcow2-linux-155b8f3aa633dbce887cded6b6b9399a3c62683e.zip
ASoC: simple-card-utils: remove strict limitation of bit/frame master
Current asoc_simple_card_parse_daifmt is keeping backward compatibility for bitmaster/framemaster which didn't use phandle. The keep compatibility, it is checking prefix length, but it is too strict. let's loosen it. Otherwise, OF-graph base sound card which doesn't have prefix can't detect daifmt. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/generic/simple-card-utils.c')
-rw-r--r--sound/soc/generic/simple-card-utils.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c
index fe726e83d0bd..9c7f5b91b90a 100644
--- a/sound/soc/generic/simple-card-utils.c
+++ b/sound/soc/generic/simple-card-utils.c
@@ -21,14 +21,13 @@ int asoc_simple_card_parse_daifmt(struct device *dev,
{
struct device_node *bitclkmaster = NULL;
struct device_node *framemaster = NULL;
- int prefix_len = prefix ? strlen(prefix) : 0;
unsigned int daifmt;
daifmt = snd_soc_of_parse_daifmt(node, prefix,
&bitclkmaster, &framemaster);
daifmt &= ~SND_SOC_DAIFMT_MASTER_MASK;
- if (prefix_len && !bitclkmaster && !framemaster) {
+ if (!bitclkmaster && !framemaster) {
/*
* No dai-link level and master setting was not found from
* sound node level, revert back to legacy DT parsing and