lkml.org 
[lkml]   [2009]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] AB3100 regulator support v1
On Sun, 30 Aug 2009, Mark Brown wrote:

> On Sun, Aug 30, 2009 at 12:27:32PM -0400, Alan Stern wrote:
> > On Sun, 30 Aug 2009, Mark Brown wrote:
>
> > > On the face of it (and without having actually looked at a running
> > > system or anything yet) I'm rather surprised that platform based MFD
> > > drivers aren't running into this issue more often. CCing in Alan who
> > > made the change.
>
> > I'm not at all familiar with the detailed issues involved here.
> > Perhaps because of this, I don't see why there's any reason for
> > deadlocking. __driver_attach() is invoked when a new driver is
> > registered; to avoid problems all you have to do is make sure you
> > aren't holding any device locks when you register a driver.
>
> Ah, it's platform_driver_probe() that's causing issues. When it is used
> the devices need to have been registered previously since the driver
> probe function isn't kept around. In order to do this for the child
> device the driver for the subdevice has to be registered from within the
> probe function of the parent, which is itself happening within the
> parent device registration.

I see. Well, in the absence of any more sophisticated solutions,
unlocking the parent's semaphore before registering the driver (and
then re-locking it afterward) should work.

Alan Stern



\
 
 \ /
  Last update: 2009-08-31 22:31    [W:0.040 / U:8.832 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site