lkml.org 
[lkml]   [2019]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] regulator: core: Add devres versions of regulator_enable/disable
On Fri, Aug 09, 2019 at 11:03:52AM +0800, Chuhong Yuan wrote:
> I wrote a coccinelle script to detect possible chances
> of utilizing devm_() APIs to simplify the driver.
> The script found 147 drivers in total and 22 of them
> have be patched.

> Within the 125 left ones, at least 31 of them (24.8%)
> are hindered from benefiting from devm_() APIs because
> of lack of a devres version of regulator_enable().

I'm not super keen on managed versions of these functions since they're
very likely to cause reference counting issues between the probe/remove
path and the suspend/resume path which aren't obvious from the code, I'm
especially worried about double frees on release.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2019-08-09 17:12    [W:0.161 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site