[U-Boot] [PATCH 09/11] env: make env_locations a global variable

Quentin Schulz quentin.schulz at free-electrons.com
Fri Dec 22 21:13:43 UTC 2017


Make env_locations a global variable so that it can be used in env
drivers.

Signed-off-by: Quentin Schulz <quentin.schulz at free-electrons.com>
---
 env/env.c             | 2 +-
 include/environment.h | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/env/env.c b/env/env.c
index 2565e7a..ccddc2a 100644
--- a/env/env.c
+++ b/env/env.c
@@ -35,7 +35,7 @@ static struct env_driver *_env_driver_lookup(enum env_location loc)
 	return NULL;
 }
 
-static enum env_location env_locations[] = {
+enum env_location env_locations[] = {
 #ifdef CONFIG_ENV_IS_IN_EEPROM
 	ENVL_EEPROM,
 #endif
diff --git a/include/environment.h b/include/environment.h
index 1e9254f..dd6450c 100644
--- a/include/environment.h
+++ b/include/environment.h
@@ -215,6 +215,8 @@ enum env_location {
 	ENVL_UNKNOWN,
 };
 
+extern enum env_location env_locations[];
+
 enum env_operation {
 	ENVO_GET_CHAR,
 	ENVO_INIT,
-- 
git-series 0.9.1


More information about the U-Boot mailing list