From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Sun, 28 Jul 2019 08:03:45 -0600 Subject: [U-Boot] [PATCH 28/39] env: Move env_valid to env.h In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> Message-ID: <20190728140357.137295-29-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- env/flash.c | 1 + env/nowhere.c | 1 + include/env.h | 9 ++++++++- include/environment.h | 7 ------- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/env/flash.c b/env/flash.c index a26d94309d..7a73466cf2 100644 --- a/env/flash.c +++ b/env/flash.c @@ -11,6 +11,7 @@ #include #include +#include #include #include #include diff --git a/env/nowhere.c b/env/nowhere.c index ea6c32eb3b..7db4eec845 100644 --- a/env/nowhere.c +++ b/env/nowhere.c @@ -9,6 +9,7 @@ #include #include +#include #include #include diff --git a/include/env.h b/include/env.h index 82214d973e..93a4c3ed6b 100644 --- a/include/env.h +++ b/include/env.h @@ -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 at denx.de. @@ -14,6 +14,13 @@ 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 * diff --git a/include/environment.h b/include/environment.h index 44a527e1fa..c3e8d7840a 100644 --- a/include/environment.h +++ b/include/environment.h @@ -165,13 +165,6 @@ extern const unsigned char default_environment[]; #include #include -/* 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, -- 2.22.0.709.g102302147b-goog