checking status semantics with compatible functions
    Benjamin Herrenschmidt 
    benh at kernel.crashing.org
       
    Tue Apr  5 21:59:36 EST 2011
    
    
  
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.
    
    
More information about the Linuxppc-dev
mailing list