diff options
author | Simon Glass | 2017-08-03 12:22:12 -0600 |
---|---|---|
committer | Tom Rini | 2017-08-16 08:30:24 -0400 |
commit | 00caae6d47645e68d6e5277aceb69592b49381a6 (patch) | |
tree | c361aa0cea3093b93c1118266fe9e2b44ac6e453 /board/raspberrypi/rpi | |
parent | fd1e959e91d2b0b2e853d09dd9167dfff18a616c (diff) |
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>
Diffstat (limited to 'board/raspberrypi/rpi')
-rw-r--r-- | board/raspberrypi/rpi/rpi.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c index 7ff7b269f9c..530f1496171 100644 --- a/board/raspberrypi/rpi/rpi.c +++ b/board/raspberrypi/rpi/rpi.c @@ -247,7 +247,7 @@ static void set_fdtfile(void) { const char *fdtfile; - if (getenv("fdtfile")) + if (env_get("fdtfile")) return; fdtfile = model->fdtfile; @@ -260,7 +260,7 @@ static void set_fdtfile(void) */ static void set_fdt_addr(void) { - if (getenv("fdt_addr")) + if (env_get("fdt_addr")) return; if (fdt_magic(fw_dtb_pointer) != FDT_MAGIC) @@ -287,7 +287,7 @@ static void set_usbethaddr(void) if (!model->has_onboard_eth) return; - if (getenv("usbethaddr")) + if (env_get("usbethaddr")) return; BCM2835_MBOX_INIT_HDR(msg); @@ -302,8 +302,8 @@ static void set_usbethaddr(void) eth_env_set_enetaddr("usbethaddr", msg->get_mac_address.body.resp.mac); - if (!getenv("ethaddr")) - env_set("ethaddr", getenv("usbethaddr")); + if (!env_get("ethaddr")) + env_set("ethaddr", env_get("usbethaddr")); return; } @@ -330,7 +330,7 @@ static void set_serial_number(void) int ret; char serial_string[17] = { 0 }; - if (getenv("serial#")) + if (env_get("serial#")) return; BCM2835_MBOX_INIT_HDR(msg); |