diff mbox series

[09/11] env: make env_locations a global variable

Message ID 95fba4d3e5ae5238927339f494e8e615df74c4ea.1513975247.git-series.quentin.schulz@free-electrons.com
State New
Headers show
Series Introduce variables whitelisting in environment | expand

Commit Message

Quentin Schulz Dec. 22, 2017, 9:13 p.m. UTC
Make env_locations a global variable so that it can be used in env
drivers.

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

Patch

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,