freebsd-dev/sys/powerpc
Jayachandran C. 07042bef45 Fix OF_finddevice error return value in case of FDT.
According to the open firmware standard, finddevice call has to return
a phandle with value of -1 in case of error.

This commit is to:
- Fix the FDT implementation of this interface (ofw_fdt_finddevice) to
  return (phandle_t)-1 in case of error, instead of 0 as it does now.
- Fix up the callers of OF_finddevice() to compare the return value with
  -1 instead of 0 to check for errors.
- Since phandle_t is unsigned, the return value of OF_finddevice should
  be checked with '== -1' rather than '<= 0' or '> 0', fix up these cases
  as well.

Reported by:	nwhitehorn

Reviewed by:	raj
Approved by:	raj, nwhitehorn
2011-12-02 15:24:39 +00:00
..
aim - There's no need to overwrite the default device method with the default 2011-11-22 21:28:20 +00:00
booke Fix OF_finddevice error return value in case of FDT. 2011-12-02 15:24:39 +00:00
compile
conf Introduce the option VFS_ALLOW_NONMPSAFE and turn it on by default on 2011-11-08 10:18:07 +00:00
cpufreq
fpu Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
include Use a global __pure2 function instead of a global register variable for 2011-11-17 15:49:42 +00:00
mambo - There's no need to overwrite the default device method with the default 2011-11-22 21:28:20 +00:00
mpc85xx - There's no need to overwrite the default device method with the default 2011-11-22 21:28:20 +00:00
ofw - There's no need to overwrite the default device method with the default 2011-11-22 21:28:20 +00:00
powermac Fix OF_finddevice error return value in case of FDT. 2011-12-02 15:24:39 +00:00
powerpc As it turns out, r186347 actually is insufficient to avoid the use of the 2011-11-15 20:11:03 +00:00
ps3 - There's no need to overwrite the default device method with the default 2011-11-22 21:28:20 +00:00
psim