Re: [PATCH 2/2] ALSA: ac97: add codecs devicetree binding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 22 Jun 2018 12:41:14 +0200,
Robert Jarzmik wrote:
> 
> Takashi Iwai <tiwai@xxxxxxx> writes:
> 
> >> Special review query: review the "return of_node_get(node)", which
> >> assumes that upon device removal, of_put_node(dev.of_node) will be
> >> called...
> >
> > Is it really done automagically?  I couldn't spot it.
> Neither could I ...
> 
> I based this on device_set_of_node_from_dev(), and the it "seemed" logical to me
> that a device probed from devicetree would take a refcnt on the devicetree node.
> 
> As the "logical" conflicted with my search for the automagical of_node_get(), I
> need the special review query.

Hm, some of these users (e.g. drivers/usb/core/*) do call
of_node_put() properly at releasing, but some look leaking to me.
I don't think we have the common code in the driver core to release
dev->of_node, at least.

If any, this should be done in ac97_codec_release(), I suppose.


Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux