[PATCH][OF] Add of_device_is_available function

David Miller davem at davemloft.net
Wed Feb 27 08:34:30 EST 2008


From: Paul Mackerras <paulus at samba.org>
Date: Tue, 26 Feb 2008 20:04:12 +1100

> It would probably be good to defend against the possibility that the
> property isn't null-terminated (for example if its length is zero).

FWIW, when I pull in the device tree on sparc I eliminate any need for
those kinds of checks by putting a '\0' at the end of every property
blob.

I copied a lot of this code from you guys, so it wouldn't surprise
me if ppc does this too.  :-)



More information about the Linuxppc-dev mailing list