Subject: Re: checking status semantics with compatible functions

From: Benjamin Herrenschmidt <[email-masked]>
Date: Tue, 05 Apr 2011 21:59:36 +1000

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.