[PATCH] of/device: Don't register disabled devices

Grant Likely grant.likely at secretlab.ca
Sat Jan 8 04:23:04 EST 2011


On Thu, Jan 06, 2011 at 10:35:35AM +1100, David Gibson wrote:
> On Wed, Jan 05, 2011 at 02:53:27PM -0800, Blanchard, Hollis wrote:
> > On 01/03/2011 03:01 PM, Grant Likely wrote:
> > > Device nodes with the property status="disabled" are not usable and so
> > > don't register them when parsing the device tree for devices.
> > >
> > This is great and all, but a fair amount of driver code explicitly 
> > searches the tree, rather than registering a probe function. That's why 
> > our earlier patches in this area were more comprehensive.

As your patch set shows, the total set isn't unmanageable, and the
preference for new code is to use the device model infrastructure if
at all possible.

> > 
> > What are your thoughts on handling those cases?
> 
> One by one.  Trying to handle the explicit searches automagically is
> just asking for trouble.

Just as David says, the special cases are... well... special.
Anything making decisions about registering devices needs to follow
the status!="okay" rules.

g.



More information about the devicetree-discuss mailing list