summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--flashrom.c8
-rw-r--r--layout.c8
-rw-r--r--layout.h2
3 files changed, 10 insertions, 8 deletions
diff --git a/flashrom.c b/flashrom.c
index 4f17382dc..4fe184320 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -1529,14 +1529,6 @@ static int check_block_eraser(const struct flashctx *flash, int k, int log)
return 0;
}
-static const struct flashrom_layout *get_layout(const struct flashctx *const flashctx)
-{
- if (flashctx->layout && flashctx->layout->num_entries)
- return flashctx->layout;
- else
- return &flashctx->fallback_layout.base;
-}
-
/**
* @brief Reads the included layout regions into a buffer.
*
diff --git a/layout.c b/layout.c
index 9bf0b038f..7ce7c579f 100644
--- a/layout.c
+++ b/layout.c
@@ -40,6 +40,14 @@ struct flashrom_layout *get_global_layout(void)
return &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->fallback_layout.base;
+}
+
#ifndef __LIBPAYLOAD__
int read_romlayout(const char *name)
{
diff --git a/layout.h b/layout.h
index f32dc8293..fd1049d83 100644
--- a/layout.h
+++ b/layout.h
@@ -58,6 +58,8 @@ struct single_layout {
};
struct flashrom_layout *get_global_layout(void);
+struct flashrom_flashctx;
+const struct flashrom_layout *get_layout(const struct flashrom_flashctx *const flashctx);
int process_include_args(struct flashrom_layout *);