lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 22 Feb 2017 23:25:22 -0800 From: Dmitry Torokhov <dmitry.torokhov@...il.com> To: Mark Brown <broonie@...nel.org> Cc: Liam Girdwood <lgirdwood@...il.com>, Guenter Roeck <linux@...ck-us.net>, lkml <linux-kernel@...r.kernel.org> Subject: Re: [PATCH v2] regulator: devres: introduce managed enable and disable operations On Tue, Feb 21, 2017 at 10:56:34AM -0800, Mark Brown wrote: > On Tue, Feb 21, 2017 at 12:30:03AM -0800, Dmitry Torokhov wrote: > > On Mon, Feb 20, 2017 at 11:02:58AM -0800, Mark Brown wrote: > > > On Mon, Feb 13, 2017 at 10:51:52AM -0800, Dmitry Torokhov wrote: > > > But that is what I meant here about managed action. You are not > > interacting with managed regulator here, you have managed enable. There > > is absolutely nothing preventing you from calling > > devm_regulator_enable() on a regulator that was obtained with > > regulator_get() (i.e. non-managed). > > That's not the point, the point is using both devm_regulator_enable() > and regulator_enable() and so on. I understand that you have objection that devm_regulator_enable() and regulator_enable() can be used together, I just do not see it being a problem in practice. I still think we need a way for the drivers to "undo" the enable automatically. Do you have some other idea how to achieve this? Do you maybe want regulator_put() to undo all outstanding disables for the regulator? Then drivers would not need to care about disabling regulators in error paths/driver teardown. Where would you want to take the API? Thanks. -- Dmitry
Powered by blists - more mailing lists