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:
@@ -77,10 +77,7 @@ int bootmeth_get_bootflow(struct udevice *dev, struct bootflow *bflow)
|
||||
|
||||
if (!ops->read_bootflow)
|
||||
return -ENOSYS;
|
||||
memset(bflow, '\0', sizeof(*bflow));
|
||||
bflow->dev = NULL;
|
||||
bflow->method = dev;
|
||||
bflow->state = BOOTFLOWST_BASE;
|
||||
bootflow_init(bflow, NULL, dev);
|
||||
|
||||
return ops->read_bootflow(dev, bflow);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user