env: Move env_valid to env.h
authorSimon Glass <sjg@chromium.org>
Thu, 1 Aug 2019 15:47:04 +0000 (09:47 -0600)
committerTom Rini <trini@konsulko.com>
Sun, 11 Aug 2019 20:43:41 +0000 (16:43 -0400)
This enum is somewhat widely used to determine if the environment is valid
or not. Move it to the common environment header file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
env/flash.c
env/nowhere.c
include/env.h
include/environment.h

index a26d943..7a73466 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <env.h>
 #include <environment.h>
 #include <linux/stddef.h>
 #include <malloc.h>
index ea6c32e..7db4eec 100644 (file)
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <env.h>
 #include <environment.h>
 #include <linux/stddef.h>
 
index 727f585..b59c3c3 100644 (file)
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0+ */
 /*
- * Common environment functions
+ * Common environment functions and definitions
  *
  * (C) Copyright 2000-2009
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
 
 struct environment_s;
 
+/* Value for environment validity */
+enum env_valid {
+       ENV_INVALID,    /* No valid environment */
+       ENV_VALID,      /* First or only environment is valid */
+       ENV_REDUND,     /* Redundant environment is valid */
+};
+
 /**
  * env_get_id() - Gets a sequence number for the environment
  *
index 44a527e..c3e8d78 100644 (file)
@@ -165,13 +165,6 @@ extern const unsigned char default_environment[];
 #include <env_flags.h>
 #include <search.h>
 
-/* Value for environment validity */
-enum env_valid {
-       ENV_INVALID,    /* No valid environment */
-       ENV_VALID,      /* First or only environment is valid */
-       ENV_REDUND,     /* Redundant environment is valid */
-};
-
 enum env_location {
        ENVL_UNKNOWN,
        ENVL_EEPROM,