lkml.org 
[lkml]   [2011]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] regulator: Remove possible deadlock from regulator_enable
On Mon, Mar 28, 2011 at 08:34:41AM -0700, David Collins wrote:

Review curtailed by me having to dash off but one comment...

> -/* locks held by regulator_enable() */
> +/* Locks are *not* held by regulator_enable(). */
> static int _regulator_enable(struct regulator_dev *rdev)
> {
> - int ret, delay;
> + struct regulator_dev *supply_rdev = NULL;
> + int ret = 0, delay;
>
> + mutex_lock(&rdev->mutex);

This is going to be terribly confusing - the _ versions of the functions
all by convention rely on their callers taking the mutex, allowing them
to be safely used from internal APIs.


\
 
 \ /
  Last update: 2011-03-28 20:15    [W:0.163 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site