diff options
author | Simon Glass <sjg@chromium.org> | 2017-08-03 12:22:14 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-08-16 08:30:44 -0400 |
commit | 35affd7a2ff9a77b9946bf93b616228fcf218d60 (patch) | |
tree | 812b1f6919c36821364b863d9b35ad7497d392bb /net | |
parent | bfebc8c965e41d62dc6355d09bdd63ca57011b99 (diff) |
env: Rename eth_getenv_enetaddr() to eth_env_get_enetaddr()
Rename this function for consistency with env_get().
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/eth-uclass.c | 2 | ||||
-rw-r--r-- | net/eth_common.c | 8 | ||||
-rw-r--r-- | net/eth_legacy.c | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/net/eth-uclass.c b/net/eth-uclass.c index 6051a6ab6f5..d30b04ba862 100644 --- a/net/eth-uclass.c +++ b/net/eth-uclass.c @@ -495,7 +495,7 @@ static int eth_post_probe(struct udevice *dev) if (eth_get_ops(dev)->read_rom_hwaddr) eth_get_ops(dev)->read_rom_hwaddr(dev); - eth_getenv_enetaddr_by_index("eth", dev->seq, env_enetaddr); + eth_env_get_enetaddr_by_index("eth", dev->seq, env_enetaddr); if (!is_zero_ethaddr(env_enetaddr)) { if (!is_zero_ethaddr(pdata->enetaddr) && memcmp(pdata->enetaddr, env_enetaddr, ARP_HLEN)) { diff --git a/net/eth_common.c b/net/eth_common.c index bde3b88322b..66d0d22966e 100644 --- a/net/eth_common.c +++ b/net/eth_common.c @@ -24,7 +24,7 @@ void eth_parse_enetaddr(const char *addr, uchar *enetaddr) } } -int eth_getenv_enetaddr(const char *name, uchar *enetaddr) +int eth_env_get_enetaddr(const char *name, uchar *enetaddr) { eth_parse_enetaddr(env_get(name), enetaddr); return is_valid_ethaddr(enetaddr); @@ -34,7 +34,7 @@ int eth_env_set_enetaddr(const char *name, const uchar *enetaddr) { char buf[ARP_HLEN_ASCII + 1]; - if (eth_getenv_enetaddr(name, (uchar *)buf)) + if (eth_env_get_enetaddr(name, (uchar *)buf)) return -EEXIST; sprintf(buf, "%pM", enetaddr); @@ -42,12 +42,12 @@ int eth_env_set_enetaddr(const char *name, const uchar *enetaddr) return env_set(name, buf); } -int eth_getenv_enetaddr_by_index(const char *base_name, int index, +int eth_env_get_enetaddr_by_index(const char *base_name, int index, uchar *enetaddr) { char enetvar[32]; sprintf(enetvar, index ? "%s%daddr" : "%saddr", base_name, index); - return eth_getenv_enetaddr(enetvar, enetaddr); + return eth_env_get_enetaddr(enetvar, enetaddr); } int eth_env_set_enetaddr_by_index(const char *base_name, int index, diff --git a/net/eth_legacy.c b/net/eth_legacy.c index 5d29d3483b1..be0cf64a3dd 100644 --- a/net/eth_legacy.c +++ b/net/eth_legacy.c @@ -137,7 +137,7 @@ int eth_write_hwaddr(struct eth_device *dev, const char *base_name, unsigned char env_enetaddr[ARP_HLEN]; int ret = 0; - eth_getenv_enetaddr_by_index(base_name, eth_number, env_enetaddr); + eth_env_get_enetaddr_by_index(base_name, eth_number, env_enetaddr); if (!is_zero_ethaddr(env_enetaddr)) { if (!is_zero_ethaddr(dev->enetaddr) && |