diff options
author | ian <ian@FreeBSD.org> | 2014-09-06 17:50:59 +0000 |
---|---|---|
committer | ian <ian@FreeBSD.org> | 2014-09-06 17:50:59 +0000 |
commit | c8e7d833d07614a2884d4a0ca2b7fd41e93acc12 (patch) | |
tree | c4d542df1f3ba87782ec3c488464e1458e7e56df /sys/dev/ofw/openfirm.c | |
parent | 183409d941304c5a06f13899a7b8ffbcd9349a0d (diff) | |
download | FreeBSD-src-c8e7d833d07614a2884d4a0ca2b7fd41e93acc12.zip FreeBSD-src-c8e7d833d07614a2884d4a0ca2b7fd41e93acc12.tar.gz |
Revert rr271190, it was based on a misunderstanding. The problem of
non-existant device<->xref info needs to be handled by creating the info,
which will come in a subsequent commit.
Diffstat (limited to 'sys/dev/ofw/openfirm.c')
-rw-r--r-- | sys/dev/ofw/openfirm.c | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/sys/dev/ofw/openfirm.c b/sys/dev/ofw/openfirm.c index 2546e05..cc997d9 100644 --- a/sys/dev/ofw/openfirm.c +++ b/sys/dev/ofw/openfirm.c @@ -554,15 +554,15 @@ OF_node_from_xref(phandle_t xref) return (node); } -static phandle_t -xref_from_node(phandle_t node, phandle_t notfoundvalue) +phandle_t +OF_xref_from_node(phandle_t node) { struct xrefinfo *xi; phandle_t xref; if (xref_init_done) { if ((xi = xrefinfo_find(node, FIND_BY_NODE)) == NULL) - return (notfoundvalue); + return (node); return (xi->xref); } @@ -570,24 +570,10 @@ xref_from_node(phandle_t node, phandle_t notfoundvalue) -1 && OF_getencprop(node, "ibm,phandle", &xref, sizeof(xref)) == -1 && OF_getencprop(node, "linux,phandle", &xref, sizeof(xref)) == -1) - return (notfoundvalue); + return (node); return (xref); } -phandle_t -OF_xref_from_node(phandle_t node) -{ - - return (xref_from_node(node, node)); -} - -phandle_t -OF_xref_from_node_strict(phandle_t node) -{ - - return (xref_from_node(node, -1)); -} - device_t OF_device_from_xref(phandle_t xref) { |