Commit 957a0e69575683efd70ace147746bbb3d8e7c501
1 parent
9314cee691
Exists in
master
and in
54 other branches
env_nvram: Move conditional compilation to Makefile
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Showing 2 changed files with 3 additions and 8 deletions Side-by-side Diff
common/Makefile
... | ... | @@ -54,7 +54,7 @@ |
54 | 54 | COBJS-$(CONFIG_ENV_IS_IN_EEPROM) += env_eeprom.o |
55 | 55 | COBJS-y += env_flash.o |
56 | 56 | COBJS-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o |
57 | -COBJS-y += env_nvram.o | |
57 | +COBJS-$(CONFIG_ENV_IS_IN_NVRAM) += env_nvram.o | |
58 | 58 | COBJS-y += env_onenand.o |
59 | 59 | COBJS-y += env_sf.o |
60 | 60 | COBJS-y += env_nowhere.o |
common/env_nvram.c
... | ... | @@ -41,15 +41,12 @@ |
41 | 41 | */ |
42 | 42 | |
43 | 43 | #include <common.h> |
44 | - | |
45 | -DECLARE_GLOBAL_DATA_PTR; | |
46 | - | |
47 | -#ifdef CONFIG_ENV_IS_IN_NVRAM /* Environment is in NVRAM */ | |
48 | - | |
49 | 44 | #include <command.h> |
50 | 45 | #include <environment.h> |
51 | 46 | #include <linux/stddef.h> |
52 | 47 | |
48 | +DECLARE_GLOBAL_DATA_PTR; | |
49 | + | |
53 | 50 | #ifdef CFG_NVRAM_ACCESS_ROUTINE |
54 | 51 | extern void *nvram_read(void *dest, const long src, size_t count); |
55 | 52 | extern void nvram_write(long dest, const void *src, size_t count); |
... | ... | @@ -156,6 +153,4 @@ |
156 | 153 | #endif |
157 | 154 | return (0); |
158 | 155 | } |
159 | - | |
160 | -#endif /* CONFIG_ENV_IS_IN_NVRAM */ |