aboutsummaryrefslogtreecommitdiff
path: root/core/fdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/fdt.c')
-rw-r--r--core/fdt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/fdt.c b/core/fdt.c
index 0131c5e..8fb9ad7 100644
--- a/core/fdt.c
+++ b/core/fdt.c
@@ -191,11 +191,11 @@ void *create_dtb(const struct dt_node *root, bool exclusive)
{
void *fdt = NULL;
size_t len = DEVICE_TREE_MAX_SIZE;
- uint32_t old_last_phandle = last_phandle;
+ uint32_t old_last_phandle = get_last_phandle();
int ret;
do {
- last_phandle = old_last_phandle;
+ set_last_phandle(old_last_phandle);
fdt_error = 0;
fdt = malloc(len);
if (!fdt) {
@@ -244,10 +244,10 @@ static int64_t opal_get_device_tree(uint32_t phandle,
return OPAL_PARAMETER;
fdt_error = 0;
- old_last_phandle = last_phandle;
+ old_last_phandle = get_last_phandle();
ret = __create_dtb(fdt, len, root, true);
if (ret) {
- last_phandle = old_last_phandle;
+ set_last_phandle(old_last_phandle);
if (ret == -FDT_ERR_NOSPACE)
return OPAL_NO_MEM;