env: Drop the env_name_spec global

Add a name to the driver and use that instead of the global variable
declared by each driver.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
Simon Glass 2017-08-03 12:22:03 -06:00 committed by Tom Rini
parent 7938822a6b
commit ac358beb85
17 changed files with 32 additions and 32 deletions

3
env/onenand.c vendored
View file

@ -21,8 +21,6 @@
#include <linux/mtd/mtd.h>
#include <linux/mtd/onenand.h>
char *env_name_spec = "OneNAND";
#define ONENAND_MAX_ENV_SIZE CONFIG_ENV_SIZE
#define ONENAND_ENV_SIZE(mtd) (ONENAND_MAX_ENV_SIZE - ENV_HEADER_SIZE)
@ -108,6 +106,7 @@ static int env_onenand_save(void)
U_BOOT_ENV_LOCATION(onenand) = {
.location = ENVL_ONENAND,
ENV_NAME("OneNAND")
.load = env_onenand_load,
.save = env_save_ptr(env_onenand_save),
};