freebsd-dev/sys/dev/fdt
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
..
fdt_common.c Fix OF_finddevice error return value in case of FDT. 2011-12-02 15:24:39 +00:00
fdt_common.h Eliminate FDT_IMMR_VA define. 2010-07-19 18:47:18 +00:00
fdt_mips.c FDT support for MIPS. 2011-10-18 07:29:21 +00:00
fdt_pci.c Don't operate on the parent of the PCI node. It's the PCI node itself 2011-01-29 21:14:29 +00:00
fdt_powerpc.c Fix OF_finddevice error return value in case of FDT. 2011-12-02 15:24:39 +00:00
fdt_static_dtb.S
fdtbus.c Fix OF_finddevice error return value in case of FDT. 2011-12-02 15:24:39 +00:00
simplebus.c Let simplebus(4) diagnostics be a bit more descriptive. 2010-07-11 20:30:59 +00:00