diff options
Diffstat (limited to 'src/barebox-state')
-rw-r--r-- | src/barebox-state/state.c | 6 | ||||
-rw-r--r-- | src/barebox-state/state.h | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/barebox-state/state.c b/src/barebox-state/state.c index d6ab464..0ec5664 100644 --- a/src/barebox-state/state.c +++ b/src/barebox-state/state.c @@ -479,7 +479,8 @@ static int of_state_fixup(struct device_node *root, void *ctx) } /* backend phandle */ - backend_node = of_find_node_by_devpath(root, state->backend_path); + backend_node = of_find_node_by_reproducible_name(root, + state->backend_reproducible_name); if (!backend_node) { ret = -ENODEV; goto out; @@ -559,6 +560,7 @@ void state_release(struct state *state) state_storage_free(&state->storage); state_format_free(state->format); free(state->backend_path); + free(state->backend_reproducible_name); free(state->of_path); free(state); } @@ -610,6 +612,8 @@ struct state *state_new_from_node(struct device_node *node, bool readonly) goto out_release_state; } + state->backend_reproducible_name = of_get_reproducible_name(partition_node); + ret = of_property_read_string(node, "backend-type", &backend_type); if (ret) { dev_dbg(&state->dev, "Missing 'backend-type' property\n"); diff --git a/src/barebox-state/state.h b/src/barebox-state/state.h index da1c6ac..6670523 100644 --- a/src/barebox-state/state.h +++ b/src/barebox-state/state.h @@ -115,6 +115,7 @@ struct state { struct state_backend_format *format; struct state_backend_storage storage; char *backend_path; + char *backend_reproducible_name; }; enum state_convert { |