Re: [alsa-devel] [PATCH] ASoC: sgtl5000: Use devm_ functions

2014-07-09 Thread Julia Lawall
On Wed, 9 Jul 2014, Mark Brown wrote: > On Wed, Jul 09, 2014 at 07:30:40AM +0200, Julia Lawall wrote: > > On Tue, 8 Jul 2014, Mark Brown wrote: > > > > 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 s

Re: [alsa-devel] [PATCH] ASoC: sgtl5000: Use devm_ functions

2014-07-09 Thread Mark Brown
On Wed, Jul 09, 2014 at 07:30:40AM +0200, Julia Lawall wrote: > On Tue, 8 Jul 2014, Mark Brown wrote: > > 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 ori

Re: [alsa-devel] [PATCH] ASoC: sgtl5000: Use devm_ functions

2014-07-08 Thread Julia Lawall
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 o

Re: [alsa-devel] [PATCH] ASoC: sgtl5000: Use devm_ functions

2014-07-08 Thread Mark Brown
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 us

Re: [alsa-devel] [PATCH] ASoC: sgtl5000: Use devm_ functions

2014-07-08 Thread Julia Lawall
On Tue, 8 Jul 2014, Mark Brown wrote: > On Mon, Jul 07, 2014 at 05:23:39PM +0200, Julia Lawall wrote: > > > There is documentation about what kinds of devm functions exist, but it is > > too bad that there is no documentation about where they can be used. > > Often there are several levels of fu

Re: [alsa-devel] [PATCH] ASoC: sgtl5000: Use devm_ functions

2014-07-08 Thread Mark Brown
On Mon, Jul 07, 2014 at 05:23:39PM +0200, Julia Lawall wrote: > There is documentation about what kinds of devm functions exist, but it is > too bad that there is no documentation about where they can be used. > Often there are several levels of function pointers involved, so it can be > hard to f

Re: [alsa-devel] [PATCH] ASoC: sgtl5000: Use devm_ functions

2014-07-07 Thread Lars-Peter Clausen
On 07/07/2014 05:23 PM, Julia Lawall wrote: On Mon, 7 Jul 2014, Fabio Estevam wrote: On Mon, Jul 7, 2014 at 11:58 AM, Julia Lawall wrote: Nevertheless, there is already a call to devm_regulator_bulk_get in sgtl5000_enable_regulators which calls sgtl5000_replace_vddd_with_ldo which calls ld

Re: [alsa-devel] [PATCH] ASoC: sgtl5000: Use devm_ functions

2014-07-07 Thread Julia Lawall
On Mon, 7 Jul 2014, Fabio Estevam wrote: > On Mon, Jul 7, 2014 at 11:58 AM, Julia Lawall wrote: > > > Nevertheless, there is already a call to devm_regulator_bulk_get in > > sgtl5000_enable_regulators which calls sgtl5000_replace_vddd_with_ldo > > which calls ldo_regulator_register. That call

Re: [alsa-devel] [PATCH] ASoC: sgtl5000: Use devm_ functions

2014-07-07 Thread Fabio Estevam
On Mon, Jul 7, 2014 at 11:58 AM, Julia Lawall wrote: > Nevertheless, there is already a call to devm_regulator_bulk_get in > sgtl5000_enable_regulators which calls sgtl5000_replace_vddd_with_ldo > which calls ldo_regulator_register. That call was introduced by > > commit 63e54cd9caa3ce0363581060