env: Rename getenv/_f() to env_get()
We are now using an env_ prefix for environment functions. Rename these
two functions for consistency. Also add function comments in common.h.
Quite a few places use getenv() in a condition context, provoking a
warning from checkpatch. These are fixed up in this patch also.
Suggested-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/board/bluegiga/apx4devkit/apx4devkit.c b/board/bluegiga/apx4devkit/apx4devkit.c
index 2215c29..25e5c3d 100644
--- a/board/bluegiga/apx4devkit/apx4devkit.c
+++ b/board/bluegiga/apx4devkit/apx4devkit.c
@@ -133,8 +133,8 @@
#ifdef CONFIG_REVISION_TAG
u32 get_board_rev(void)
{
- if (getenv("revision#") != NULL)
- return simple_strtoul(getenv("revision#"), NULL, 10);
+ if (env_get("revision#") != NULL)
+ return simple_strtoul(env_get("revision#"), NULL, 10);
return 0;
}
#endif