Patchwork [U-Boot,5/7] mv_common.c: don't compile reset_environment if ENV_IS_NOWHERE

login
register
mail settings
Submitter Michael Jones
Date July 15, 2011, 9:09 a.m.
Message ID <1310720986-5474-6-git-send-email-michael.jones@matrix-vision.de>
Download mbox | patch
Permalink /patch/104768/
State Accepted
Commit 12b5723b3e599857812abfeeb2c241c700274542
Headers show

Comments

Michael Jones - July 15, 2011, 9:09 a.m.
Doesn't make sense to provide this function to boards which defined
CONFIG_ENV_IS_NOWHERE. Such a board gets a linking error because
common/env_nowhere.c doesn't define saveenv().

Signed-off-by: Michael Jones <michael.jones@matrix-vision.de>
---
 board/matrix_vision/common/mv_common.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
Mike Frysinger - July 18, 2011, 5:39 p.m.
On Fri, Jul 15, 2011 at 05:09, Michael Jones wrote:
> Doesn't make sense to provide this function to boards which defined
> CONFIG_ENV_IS_NOWHERE. Such a board gets a linking error because
> common/env_nowhere.c doesn't define saveenv().

Acked-by: Mike Frysinger <vapier@gentoo.org>
-mike

Patch

diff --git a/board/matrix_vision/common/mv_common.c b/board/matrix_vision/common/mv_common.c
index 0afc535..404c8b4 100644
--- a/board/matrix_vision/common/mv_common.c
+++ b/board/matrix_vision/common/mv_common.c
@@ -38,6 +38,7 @@  static char* entries_to_keep[] = {
 #define MV_MAX_ENV_ENTRY_LENGTH	64
 #define MV_KEEP_ENTRIES		ARRAY_SIZE(entries_to_keep)
 
+#ifndef CONFIG_ENV_IS_NOWHERE
 void mv_reset_environment(void)
 {
 	int i;
@@ -67,6 +68,7 @@  void mv_reset_environment(void)
 
 	saveenv();
 }
+#endif
 
 int mv_load_fpga(void)
 {