mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
bootstd: Add a way to set up a bootflow
Add a function to init a bootflow, to reduce code duplication. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
cbd71fad6d
commit
b190deb895
4 changed files with 23 additions and 8 deletions
|
@ -440,10 +440,7 @@ int bootdev_get_bootflow(struct udevice *dev, struct bootflow_iter *iter,
|
|||
|
||||
if (!ops->get_bootflow)
|
||||
return -ENOSYS;
|
||||
memset(bflow, '\0', sizeof(*bflow));
|
||||
bflow->dev = dev;
|
||||
bflow->method = iter->method;
|
||||
bflow->state = BOOTFLOWST_BASE;
|
||||
bootflow_init(bflow, dev, iter->method);
|
||||
|
||||
return ops->get_bootflow(dev, iter, bflow);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue