dm: convert device_get_global_by_of_offset() to device_get_global_by_ofnode()

Also add device_find_global_by_ofnode() that also find a device based on
the OF node, but doesn't probe the device.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
This commit is contained in:
Jean-Jacques Hiblot
2018-08-09 16:17:44 +02:00
committed by Marek Vasut
parent 999b204383
commit 7ec9181d6a
4 changed files with 34 additions and 12 deletions

View File

@@ -49,7 +49,7 @@ u32 spl_boot_device(void)
debug("node=%d\n", node);
goto fallback;
}
ret = device_get_global_by_of_offset(node, &dev);
ret = device_get_global_by_ofnode(offset_to_ofnode(node), &dev);
if (ret) {
debug("device at node %s/%d not found: %d\n", bootdev, node,
ret);

View File

@@ -51,7 +51,7 @@ u32 spl_boot_device(void)
debug("node=%d\n", node);
goto fallback;
}
ret = device_get_global_by_of_offset(node, &dev);
ret = device_get_global_by_ofnode(offset_to_ofnode(node), &dev);
if (ret) {
debug("device at node %s/%d not found: %d\n", bootdev, node,
ret);