On Mon, Feb 13, 2017 at 10:51:52AM -0800, Dmitry Torokhov wrote:

> I think it is helps if you think about devm_regulator_enable and regular
> regulator_enable as managed and unmanaged *actions*, not resources. So

That's how I see them but it's still not really helping my concern, in
general if you do a thing with devm_ you don't want to also be
interacting with the same resource in the same way with a non-managed
call.

> managed action of enabling regulator will be undone on remove() and you
> have to manually undo unmanaged regulator_disable() on resume(). It is
> not worse than having unbalanced regulator_enable/disable between
> probe()/suspend()/resume()/remove().

I find it that bit harder to think about - tracking balancing of the
same thing is a lot easier than tracking balancing of two different not
quite equivalent things.

Attachment: signature.asc
Description: PGP signature

Reply via email to