lkml.org 
[lkml]   [2014]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [alsa-devel] [PATCH] ASoC: sgtl5000: Use devm_ functions


On Tue, 8 Jul 2014, Mark Brown wrote:

> On Tue, Jul 08, 2014 at 10:15:20AM +0200, Julia Lawall wrote:
> > On Tue, 8 Jul 2014, Mark Brown wrote:
>
> > > It should be fairly clear given what they do I'd have thought - the
> > > devm_ functions tie the deallocation of a resource to the unbinding of
> > > a driver from a device so they can only be used to replace things that
> > > get cleaned up in a device model unbind path. There's not usually a
> > > great deal of indirection going on in those.
>
> > It is completely clear what they do. What is not clear is what device
> > libraries are set up to call the freeing functions at what point. For
> > example, I know that that platform drivers are set up for this, but once I
> > tried to find the lines of code that would justify that, but I could not.
> > Perhaps I was not patient enough or missed something.
>
> All devices do this - it's done as part of the driver model core code so
> there is no need for individual buses to do anything.

How should one realize that this does not apply to the original file
under discussion, sound/soc/codecs/sgtl5000.c? The associated structure
is snd_soc_codec_driver. What code could one look for at the call sites
of the probe and remove functions to know that managed memory can be used?

thanks,
julia


\
 
 \ /
  Last update: 2014-07-09 08:21    [W:0.122 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site