[U-Boot] [PATCH 03/14] net: cosmetic: Define ethernet name length

Olliver Schinagl oliver at schinagl.nl
Fri Nov 25 16:30:21 CET 2016


There are various places where the ethernet device name is defined to
several different sizes. Lets add a define and start using it.

Signed-off-by: Olliver Schinagl <oliver at schinagl.nl>
---
 include/net.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/net.h b/include/net.h
index af0558d..9cd7870 100644
--- a/include/net.h
+++ b/include/net.h
@@ -168,7 +168,8 @@ void eth_halt_state_only(void); /* Set passive state */
 
 #ifndef CONFIG_DM_ETH
 struct eth_device {
-	char name[16];
+#define ETH_NAME_LEN 16
+	char name[ETH_NAME_LEN];
 	unsigned char enetaddr[ARP_HLEN];
 	phys_addr_t iobase;
 	int state;
-- 
2.10.2



More information about the U-Boot mailing list