[alsa-devel] [PATCH v4 14/15] ASoC: rockchip/rockchip-hdmi-audio: add sound driver for hdmi audio
Mark Brown
broonie at kernel.org
Fri Mar 27 02:19:14 CET 2015
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20150326/6af5bff2/attachment.sig>
More information about the Alsa-devel
mailing list