summaryrefslogtreecommitdiff
path: root/env/nand.c
diff options
context:
space:
mode:
authorRajesh Bhagat <rajesh.bhagat@nxp.com>2018-11-05 18:01:10 +0000
committerYork Sun <york.sun@nxp.com>2018-12-04 13:07:13 -0800
commitb6cba297affba968a8d8465655c71cb3ec8a9bde (patch)
tree7c25dbcfd59cd82f3099f76ebdcb704f9c58d8d7 /env/nand.c
parentd171c70716d49f0e14eb357ab645c8e72b791ca1 (diff)
env: allow flash and nand env driver to compile together
Define env_ptr as static in flash and nand env driver to allow these to compile together. Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
Diffstat (limited to 'env/nand.c')
-rw-r--r--env/nand.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/env/nand.c b/env/nand.c
index 3698e68957..29eda66fad 100644
--- a/env/nand.c
+++ b/env/nand.c
@@ -40,11 +40,9 @@
#endif
#if defined(ENV_IS_EMBEDDED)
-env_t *env_ptr = &environment;
+static env_t *env_ptr = &environment;
#elif defined(CONFIG_NAND_ENV_DST)
-env_t *env_ptr = (env_t *)CONFIG_NAND_ENV_DST;
-#else /* ! ENV_IS_EMBEDDED */
-env_t *env_ptr;
+static env_t *env_ptr = (env_t *)CONFIG_NAND_ENV_DST;
#endif /* ENV_IS_EMBEDDED */
DECLARE_GLOBAL_DATA_PTR;