diff options
author | Takashi Iwai | 2019-02-28 13:30:55 +0100 |
---|---|---|
committer | Takashi Iwai | 2019-02-28 13:30:55 +0100 |
commit | 70395a96bd882d8dba669f99b5cec0008690accd (patch) | |
tree | 37f3a4c2cf35828f153f3ce59c3daa4f39241c32 /sound/soc/qcom/common.c | |
parent | f97a0944a72b26a2bece72516294e112a890f98a (diff) | |
parent | 3146089d235b304e665dc551472ae9cb9ab58572 (diff) |
Merge tag 'asoc-v5.1-2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: More changes for v5.1
Another batch of changes for ASoC, no big core changes - it's mainly
small fixes and improvements for individual drivers.
- A big refresh and cleanup of the Samsung drivers, fixing a number of
issues which allow the driver to be used with a wider range of
userspaces.
- Fixes for the Intel drivers to make them more standard so less likely
to get bitten by core issues.
- New driver for Cirrus Logic CS35L26.
Diffstat (limited to 'sound/soc/qcom/common.c')
-rw-r--r-- | sound/soc/qcom/common.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sound/soc/qcom/common.c b/sound/soc/qcom/common.c index 4715527054e5..5661025e8cec 100644 --- a/sound/soc/qcom/common.c +++ b/sound/soc/qcom/common.c @@ -42,6 +42,9 @@ int qcom_snd_parse_of(struct snd_soc_card *card) link = card->dai_link; for_each_child_of_node(dev->of_node, np) { cpu = of_get_child_by_name(np, "cpu"); + platform = of_get_child_by_name(np, "platform"); + codec = of_get_child_by_name(np, "codec"); + if (!cpu) { dev_err(dev, "Can't find cpu DT node\n"); ret = -EINVAL; @@ -63,8 +66,6 @@ int qcom_snd_parse_of(struct snd_soc_card *card) goto err; } - platform = of_get_child_by_name(np, "platform"); - codec = of_get_child_by_name(np, "codec"); if (codec && platform) { link->platform_of_node = of_parse_phandle(platform, "sound-dai", @@ -100,10 +101,15 @@ int qcom_snd_parse_of(struct snd_soc_card *card) link->dpcm_capture = 1; link->stream_name = link->name; link++; + + of_node_put(cpu); + of_node_put(codec); + of_node_put(platform); } return 0; err: + of_node_put(np); of_node_put(cpu); of_node_put(codec); of_node_put(platform); |