On Fri, Aug 21, 2015 at 10:30:17AM -0700, Dmitry Torokhov wrote: > On Fri, Aug 21, 2015 at 9:58 AM, Mark Brown 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.