summaryrefslogtreecommitdiffstats
path: root/layout.c
diff options
context:
space:
mode:
Diffstat (limited to 'layout.c')
-rw-r--r--layout.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/layout.c b/layout.c
index ede476ac4..11df15cf8 100644
--- a/layout.c
+++ b/layout.c
@@ -33,12 +33,17 @@ struct flashrom_layout *get_global_layout(void)
return &global_layout;
}
+const struct flashrom_layout *get_default_layout(const struct flashrom_flashctx *const flashctx)
+{
+ return flashctx->default_layout;
+}
+
const struct flashrom_layout *get_layout(const struct flashrom_flashctx *const flashctx)
{
if (flashctx->layout && flashctx->layout->num_entries)
return flashctx->layout;
else
- return flashctx->default_layout;
+ return get_default_layout(flashctx);
}
static struct romentry *mutable_layout_next(