[Ksummit-discuss] [TECH TOPIC] Fix devm_kzalloc, its users, or both

Mark Brown broonie at kernel.org
Fri Aug 21 17:41:50 UTC 2015


On Fri, Aug 21, 2015 at 10:30:17AM -0700, Dmitry Torokhov wrote:
> On Fri, Aug 21, 2015 at 9:58 AM, Mark Brown <broonie at kernel.org> wrote:

> > For most of those there's no issue with devm - we're just releasing a
> > reference that allows us to control the device, not doing anything that
> > affects the state of the device.  We don't have managed functions for
> > the state changing operations.

> That is true (at least for now), but there is a demand for adding
> them. In the meantime they are quite often invoked via a custom devm
> action.

At least for regulator I'm seeing very occasional requests for this but
they're really not very strong.

> They are also often wrapped into other objects. For example input
> device might turn off regulators/clocks in it's close() method, which
> is called as part of input_unregister_device(). If input device is
> managed then that state change happens "some time later".

Right, but my understanding is that the integration with devm with the
object reference counting was intended to do the right thing.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.linuxfoundation.org/pipermail/ksummit-discuss/attachments/20150821/e4add957/attachment.sig>


More information about the Ksummit-discuss mailing list