lkml.org 
[lkml]   [2009]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] Regulator: Add a voltage changed event to notify consumers
Mark Brown wrote:
> On Sun, Jan 18, 2009 at 06:47:25PM +0000, Jonathan Cameron wrote:
>
>> -out:
>> + mutex_unlock(&rdev->mutex);
>> + _notifier_call_chain(rdev, REGULATOR_EVENT_VOLTAGE_CHANGE, NULL);
>> + return 0;
>> +out_unlock:
>
> It'd be nice if we could modify _notifier_call_chain() to push the
> locking out a bit so we don't need to drop the lock before calling the
> notifier. On the other hand, for anything that isn't memory mapped or
> GPIO controlled (most regulators are in this category) the cost of the
> I/O is going to make this a non-issue.
Agreed. On that note, isn't any call to regulator_force_disable
currently going to deadlock? (lock held in regulator_force_disable,
then re-called in _notifier_call_chain.)

I'll have a look into moving the locks out of _notifier_call_chain.

Jonathan



\
 
 \ /
  Last update: 2009-01-19 17:59    [W:0.038 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site