27 Mar
2015
27 Mar
'15
3:19 a.m.
On Fri, Mar 27, 2015 at 09:16:17AM +0800, yakir wrote:
On 2015年03月27日 02:16, Mark Brown wrote:
+free_cpu_of_node:
- hdmi_audio_dai.cpu_of_node = NULL;
- hdmi_audio_dai.platform_of_node = NULL;
+free_priv_data:
- snd_soc_card_set_drvdata(card, NULL);
- platform_set_drvdata(pdev, NULL);
- card->dev = NULL;
If any of these assignments is doing anything there's a problem with the code.
Yes, when probe failed, program will goto this code.
You're missing the point, these don't do anything useful.
+{
- struct snd_soc_card *card = platform_get_drvdata(pdev);
- snd_soc_unregister_card(card);
devm_snd_soc_register_card() and you can remove this function entirely.
do you mean that when I take devm_snd_soc_register_card() to register card, then I do not need unregister card any more(destroy with device) ?
Yes, that is the whole point of the devm_ APIs.