[U-Boot] [PATCH 09/10] net: tsi108_eth: Add initialized eth_device structure
iwamatsu at nigauri.org
iwamatsu at nigauri.org
Thu Oct 14 05:53:50 CEST 2010
From: Nobuhiro Iwamatsu <iwamatsu at nigauri.org>
tsi108_eth driver does not have write_hwaddr function.
However, eth stuff executes write_hwaddr function
because eth_device structure has not been initialized.
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu at nigauri.org>
CC: Ben Warren <biggerbadderben at gmail.com>
---
drivers/net/tsi108_eth.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/tsi108_eth.c b/drivers/net/tsi108_eth.c
index 079354a..564125e 100644
--- a/drivers/net/tsi108_eth.c
+++ b/drivers/net/tsi108_eth.c
@@ -731,7 +731,7 @@ int tsi108_eth_initialize (bd_t * bis)
for (index = 0; index < CONFIG_TSI108_ETH_NUM_PORTS; index++) {
dev = (struct eth_device *)malloc(sizeof(struct eth_device));
-
+ memset(dev, 0, sizeof(*dev));
sprintf (dev->name, "TSI108_eth%d", index);
dev->iobase = ETH_BASE + (index * ETH_PORT_OFFSET);
--
1.7.1
More information about the U-Boot
mailing list