mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-02 14:33:18 +02:00
flashrom.c: flatten out read_buf_from_include_args()
read_buf_from_include_args() does not need the whole flashctx, rather it works with a fix layout and buffer. Just pass what state is actually required. BUG=b:242246291 TEST=builds Change-Id: Ieadd68895c7ba05cc3d770d304351b02622f14d7 Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/66633 Reviewed-by: Evan Benn <evanbenn@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Nikolai Artemiev <nartemiev@google.com> Reviewed-by: Sam McNally <sammc@google.com> Reviewed-by: Thomas Heijligen <src@posteo.de>
This commit is contained in:

committed by
Edward O'Callaghan

parent
75b7455441
commit
ac7f0c20b8
@ -926,14 +926,12 @@ out:
|
||||
* then this will read file data into the corresponding region in the
|
||||
* supplied buffer.
|
||||
*
|
||||
* @param flashctx Flash context to be used.
|
||||
* @param layout The layout to be used.
|
||||
* @param buf Chip-sized buffer to write data to
|
||||
* @return 0 on success
|
||||
*/
|
||||
int read_buf_from_include_args(const struct flashctx *const flash,
|
||||
unsigned char *buf)
|
||||
int read_buf_from_include_args(const struct flashrom_layout *const layout, unsigned char *buf)
|
||||
{
|
||||
const struct flashrom_layout *const layout = get_layout(flash);
|
||||
const struct romentry *entry = NULL;
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user