freebsd-dev/sys/dev/ofw
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
..
ofw_bus_if.m
ofw_bus_subr.c Provide for multiple, cascaded PICs on PowerPC systems, and extend the 2010-06-18 14:06:27 +00:00
ofw_bus_subr.h Provide for multiple, cascaded PICs on PowerPC systems, and extend the 2010-06-18 14:06:27 +00:00
ofw_bus.h
ofw_console.c Follow up to r225203 refining break-to-debugger run-time configuration 2011-08-27 14:24:27 +00:00
ofw_disk.c
ofw_fdt.c Fix OF_finddevice error return value in case of FDT. 2011-12-02 15:24:39 +00:00
ofw_if.m Change OF_interpret() to also take an array of cell_t (missed in r209801). 2010-09-11 18:55:00 +00:00
ofw_iicbus.c s,KOBJMETHOD_END,DEVMETHOD_END,g in order to fully hide the explicit mention 2011-11-22 21:55:40 +00:00
ofw_pci.h
ofw_standard.c Change OF_interpret() to also take an array of cell_t (missed in r209801). 2010-09-11 18:55:00 +00:00
ofwvar.h
openfirm.c Fix OF_finddevice error return value in case of FDT. 2011-12-02 15:24:39 +00:00
openfirm.h Missed a file in r209803: this header contains a definition of 2010-07-08 18:15:06 +00:00
openfirmio.c
openfirmio.h
openpromio.c
openpromio.h