From ac7f0c20b816784fca6b21e2a931f55b4089e219 Mon Sep 17 00:00:00 2001 From: Edward O'Callaghan Date: Thu, 11 Aug 2022 22:02:26 +1000 Subject: 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 Reviewed-on: https://review.coreboot.org/c/flashrom/+/66633 Reviewed-by: Evan Benn Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber Reviewed-by: Nikolai Artemiev Reviewed-by: Sam McNally Reviewed-by: Thomas Heijligen --- flashrom.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'flashrom.c') diff --git a/flashrom.c b/flashrom.c index 229a47441..35fdc7da7 100644 --- a/flashrom.c +++ b/flashrom.c @@ -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; /* -- cgit v1.2.3