summaryrefslogtreecommitdiff
path: root/drivers/net/fsl-mc/mc.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-08-03 12:22:12 -0600
committerTom Rini <trini@konsulko.com>2017-08-16 08:30:24 -0400
commit00caae6d47645e68d6e5277aceb69592b49381a6 (patch)
treec361aa0cea3093b93c1118266fe9e2b44ac6e453 /drivers/net/fsl-mc/mc.c
parentfd1e959e91d2b0b2e853d09dd9167dfff18a616c (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 'drivers/net/fsl-mc/mc.c')
-rw-r--r--drivers/net/fsl-mc/mc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c
index 3a30c03b85..be82371766 100644
--- a/drivers/net/fsl-mc/mc.c
+++ b/drivers/net/fsl-mc/mc.c
@@ -530,7 +530,7 @@ static unsigned long get_mc_boot_timeout_ms(void)
{
unsigned long timeout_ms = CONFIG_SYS_LS_MC_BOOT_TIMEOUT_MS;
- char *timeout_ms_env_var = getenv(MC_BOOT_TIMEOUT_ENV_VAR);
+ char *timeout_ms_env_var = env_get(MC_BOOT_TIMEOUT_ENV_VAR);
if (timeout_ms_env_var) {
timeout_ms = simple_strtoul(timeout_ms_env_var, NULL, 10);
@@ -815,7 +815,7 @@ unsigned long mc_get_dram_block_size(void)
{
unsigned long dram_block_size = CONFIG_SYS_LS_MC_DRAM_BLOCK_MIN_SIZE;
- char *dram_block_size_env_var = getenv(MC_MEM_SIZE_ENV_VAR);
+ char *dram_block_size_env_var = env_get(MC_MEM_SIZE_ENV_VAR);
if (dram_block_size_env_var) {
dram_block_size = simple_strtoul(dram_block_size_env_var, NULL,
@@ -1518,7 +1518,7 @@ void mc_env_boot(void)
* address info properly. Without MAC addresses, the MC code
* can not properly initialize the DPC.
*/
- mc_boot_env_var = getenv(MC_BOOT_ENV_VAR);
+ mc_boot_env_var = env_get(MC_BOOT_ENV_VAR);
if (mc_boot_env_var)
run_command_list(mc_boot_env_var, -1, 0);
#endif /* CONFIG_FSL_MC_ENET */