diff options
author | Simon Glass <sjg@chromium.org> | 2024-11-15 16:19:09 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-01-15 08:48:42 -0600 |
commit | 92182257733b446f3074a8a9b0a7eafea6ea8c1c (patch) | |
tree | 19ddbe4e6a45f3aafed8a2bf2515a12aff25788a /boot/bootdev-uclass.c | |
parent | 47903aacc520c96bafae1225484e5df740a233e6 (diff) |
bootstd: Move bootflow-clearing to bootstd
This relates to more than just the bootdev, since there is a global list
of bootflows. Move the function to the bootstd file and rename it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'boot/bootdev-uclass.c')
-rw-r--r-- | boot/bootdev-uclass.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c index eddbf60600c..26b003427ec 100644 --- a/boot/bootdev-uclass.c +++ b/boot/bootdev-uclass.c @@ -557,19 +557,6 @@ int bootdev_get_bootflow(struct udevice *dev, struct bootflow_iter *iter, return ops->get_bootflow(dev, iter, bflow); } -void bootdev_clear_bootflows(struct udevice *dev) -{ - struct bootdev_uc_plat *ucp = dev_get_uclass_plat(dev); - - while (!list_empty(&ucp->bootflow_head)) { - struct bootflow *bflow; - - bflow = list_first_entry(&ucp->bootflow_head, struct bootflow, - bm_node); - bootflow_remove(bflow); - } -} - int bootdev_next_label(struct bootflow_iter *iter, struct udevice **devp, int *method_flagsp) { @@ -935,7 +922,11 @@ static int bootdev_post_bind(struct udevice *dev) static int bootdev_pre_unbind(struct udevice *dev) { - bootdev_clear_bootflows(dev); + int ret; + + ret = bootstd_clear_bootflows_for_bootdev(dev); + if (ret) + return log_msg_ret("bun", ret); return 0; } |