Linux Tegra architecture development
 help / color / mirror / Atom feed
From: Jon Hunter <jonathanh@nvidia.com>
To: Dmitry Osipenko <digetx@gmail.com>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	Mark Brown <broonie@kernel.org>
Cc: "linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
	Linux-ALSA <alsa-devel@alsa-project.org>
Subject: Re: [PATCH 5/9] ASoC: soc-core: use soc_find_component() at snd_soc_get_dai_id()
Date: Tue, 25 Jun 2019 23:38:14 +0100	[thread overview]
Message-ID: <374e71f7-b49c-ec79-f3ca-ae630a383521@nvidia.com> (raw)
In-Reply-To: <cb3a6d0a-ca7b-d6b6-72db-5dff520acfc9@gmail.com>


On 25/06/2019 21:47, Dmitry Osipenko wrote:
> 13.05.2019 10:07, Kuninori Morimoto пишет:
>> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>>
>> soc-core core already has soc_find_component() which find
>> component from device node.
>> Let's use existing function to find component.
>>
>> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>> ---
>>  sound/soc/soc-core.c | 17 +++++------------
>>  1 file changed, 5 insertions(+), 12 deletions(-)
>>
>> diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
>> index e55170c..e83edbe 100644
>> --- a/sound/soc/soc-core.c
>> +++ b/sound/soc/soc-core.c
>> @@ -3751,7 +3751,7 @@ EXPORT_SYMBOL_GPL(snd_soc_of_parse_daifmt);
>>  
>>  int snd_soc_get_dai_id(struct device_node *ep)
>>  {
>> -	struct snd_soc_component *pos;
>> +	struct snd_soc_component *component;
>>  	struct device_node *node;
>>  	int ret;
>>  
>> @@ -3765,17 +3765,10 @@ int snd_soc_get_dai_id(struct device_node *ep)
>>  	 */
>>  	ret = -ENOTSUPP;
>>  	mutex_lock(&client_mutex);
>> -	for_each_component(pos) {
>> -		struct device_node *component_of_node = soc_component_to_node(pos);
>> -
>> -		if (component_of_node != node)
>> -			continue;
>> -
>> -		if (pos->driver->of_xlate_dai_id)
>> -			ret = pos->driver->of_xlate_dai_id(pos, ep);
>> -
>> -		break;
>> -	}
>> +	component = soc_find_component(node, NULL);
>> +	if (component &&
>> +	    component->driver->of_xlate_dai_id)
>> +		ret = component->driver->of_xlate_dai_id(component, ep);
>>  	mutex_unlock(&client_mutex);
>>  
>>  	of_node_put(node);
>>
> 
> Hi,
> 
> This patch causes crash on today's linux-next apparently because "CPU DAI" is not
> registered now, any ideas?

FWIW I am seeing the same crash/regression, however, the bisect is
pointing to commit b9f2e25c599bbbf0646957e07ebb72b942c286cc ("ASoC:
soc-core: use soc_find_component() at snd_soc_find_dai()") and reverting
this commit fixes the problem for me.

Dmitry, are you sure it is this commit? They do have a similar name.

Cheers
Jon

-- 
nvpublic
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  reply	other threads:[~2019-06-25 22:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87y33aaluu.wl-kuninori.morimoto.gx@renesas.com>
     [not found] ` <87r292alro.wl-kuninori.morimoto.gx@renesas.com>
2019-06-25 20:47   ` [PATCH 5/9] ASoC: soc-core: use soc_find_component() at snd_soc_get_dai_id() Dmitry Osipenko
2019-06-25 22:38     ` Jon Hunter [this message]
2019-06-25 22:43       ` Dmitry Osipenko
2019-06-25 23:39         ` Kuninori Morimoto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=374e71f7-b49c-ec79-f3ca-ae630a383521@nvidia.com \
    --to=jonathanh@nvidia.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=digetx@gmail.com \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=linux-tegra@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox