[PATCH 3/8] net: dc2114x: set the card number to start at zero

Hanyuan Zhao hanyuan-z at qq.com
Fri Aug 9 10:56:56 CEST 2024


Otherwise the number might get kind of weird.

Signed-off-by: Hanyuan Zhao <zhaohy22 at mails.tsinghua.edu.cn>
---
 drivers/net/dc2114x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/dc2114x.c b/drivers/net/dc2114x.c
index 7f0715429f..cf9f78163a 100644
--- a/drivers/net/dc2114x.c
+++ b/drivers/net/dc2114x.c
@@ -561,7 +561,7 @@ static int dc2114x_read_rom_hwaddr(struct udevice *dev)
 
 static int dc2114x_bind(struct udevice *dev)
 {
-	static int card_number;
+	static int card_number = 0;
 	char name[16];
 
 	sprintf(name, "dc2114x#%u", card_number++);
-- 
2.39.2



More information about the U-Boot mailing list