From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754900Ab1AGRXJ (ORCPT ); Fri, 7 Jan 2011 12:23:09 -0500 Received: from mail-pw0-f46.google.com ([209.85.160.46]:57756 "EHLO mail-pw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754532Ab1AGRXH (ORCPT ); Fri, 7 Jan 2011 12:23:07 -0500 Date: Fri, 7 Jan 2011 10:23:04 -0700 From: Grant Likely To: David Gibson , "Blanchard, Hollis" , devicetree-discuss@lists.ozlabs.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Scott Wood , Benjamin Herrenschmidt , "Saxena, Deepak" Subject: Re: [PATCH] of/device: Don't register disabled devices Message-ID: <20110107172304.GC25446@angua.secretlab.ca> References: <20110103230122.25772.72990.stgit@localhost6.localdomain6> <20110105233535.GB8846@yookeroo> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110105233535.GB8846@yookeroo> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.