From c32c8dc8af9e971f91feaee145f1e8d6f114cad6 Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Sun, 16 Jun 2019 19:46:46 +0200 Subject: layout: Introduce flashrom_layout_new() It initializes an empty layout. Currently the maximum number of entries has to be specified, which will vanish once we use dynamic allocation per entry. We replace the two special cases `single_layout` and `ich_layout` with dynamically allocated layouts. As a result, we have to take care to release the `default_layout` in a flashctx once we are done with it. Change-Id: I2ae7246493ff592e631cce924777925c7825e398 Signed-off-by: Nico Huber Reviewed-on: https://review.coreboot.org/c/flashrom/+/33543 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan Reviewed-by: Angel Pons --- flash.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'flash.h') diff --git a/flash.h b/flash.h index dd8e15655..3912e730c 100644 --- a/flash.h +++ b/flash.h @@ -265,7 +265,7 @@ struct flashrom_flashctx { chipaddr virtual_registers; struct registered_master *mst; const struct flashrom_layout *layout; - struct single_layout fallback_layout; + struct flashrom_layout *default_layout; struct { bool force; bool force_boardmismatch; -- cgit v1.2.3