lkml.org 
[lkml]   [2015]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 14/15] ASoC: rockchip/rockchip-hdmi-audio: add sound driver for hdmi audio
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.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2015-03-27 03:01    [W:0.052 / U:1.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site