diff options
author | Simon Glass <sjg@chromium.org> | 2024-11-15 16:19:12 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-01-15 08:48:42 -0600 |
commit | 49867e804543f64ca216653c3905d8022c31fc84 (patch) | |
tree | 8588bae07829c92ab693f0c1198ff4ccdc5afe39 /include/bootflow.h | |
parent | 6a3eb84b18333eb4beb7e660fa9ae8ccff07b0c4 (diff) |
bootstd: Move the bootflow list into an alist
Use an alist for this data structure as it is somewhat simpler to
manage. This means that bootstd holds a simple list of bootflow structs
and can drop it at will, without chasing down lists.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/bootflow.h')
-rw-r--r-- | include/bootflow.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/include/bootflow.h b/include/bootflow.h index 64d1d6c3786..9b24fb5c3eb 100644 --- a/include/bootflow.h +++ b/include/bootflow.h @@ -56,11 +56,8 @@ enum bootflow_flags_t { /** * struct bootflow - information about a bootflow * - * This is connected into a linked list: + * All bootflows are listed in bootstd's bootflow alist in struct bootstd_priv * - * glob_sibling - links all bootflows in all bootdevs - * - * @glob_node: Points to siblings in the global list (all bootdev) * @dev: Bootdev device which produced this bootflow, NULL for flows created by * BOOTMETHF_GLOBAL bootmeths * @blk: Block device which contains this bootflow, NULL if this is a network @@ -90,7 +87,6 @@ enum bootflow_flags_t { * @bootmeth_priv: Private data for the bootmeth */ struct bootflow { - struct list_head glob_node; struct udevice *dev; struct udevice *blk; int part; @@ -390,7 +386,10 @@ const char *bootflow_state_get_name(enum bootflow_state_t state); /** * bootflow_remove() - Remove a bootflow and free its memory * - * This updates the linked lists containing the bootflow then frees it. + * This updates the 'global' linked list containing the bootflow, then frees it. + * It does not remove it from bootflows alist in struct bootstd_priv + * + * This does not free bflow itself, since this is assumed to be in an alist * * @bflow: Bootflow to remove */ |