From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Herrenschmidt Subject: Re: checking status semantics with compatible functions Date: Tue, 05 Apr 2011 21:59:36 +1000 Message-ID: <1302004776.2549.153.camel@pasglop> References: <9BC4C90E-090F-4961-A242-10D769C08738@kernel.crashing.org> <20110330143113.GA13685@ponder.secretlab.ca> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20110330143113.GA13685-e0URQFbLeQY2iJbIjFUEsiwD8/FfD2ys@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org To: Grant Likely Cc: Linuxppc-dev list , devicetree-discuss , Prabhakar Kushwaha List-Id: devicetree@vger.kernel.org On Wed, 2011-03-30 at 08:31 -0600, Grant Likely wrote: > Yes, of_device_is_available() should be checked, but it should not be > added directly to of_device_is_compatible(). I'm okay with adding > a helper variant that does the of_device_is_compatible() check. > > In that particular case, I'd also suggest using > for_each_matching_node(). Agreed. A device might be unavailable due to how FW configured the machine, but made later on available by the kernel, that shouldn't impact the interface compatibility test. Cheers, Ben.