Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshl...@gmail.com>
---
 drivers/net/tsi108_eth.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/tsi108_eth.c b/drivers/net/tsi108_eth.c
index bed09d5..ea26c2c 100644
--- a/drivers/net/tsi108_eth.c
+++ b/drivers/net/tsi108_eth.c
@@ -718,6 +718,13 @@ static int marvell_88e_phy_config (struct eth_device *dev, 
int *speed,
        return 1;
 }
 
+static struct eth_ops tsi108_eth_ops = {
+       .init = tsi108_eth_probe,
+       .halt = tsi108_eth_halt,
+       .send = tsi108_eth_send,
+       .recv = tsi108_eth_recv
+};
+
 /*
  * External interface
  *
@@ -739,10 +746,7 @@ int tsi108_eth_initialize (bd_t * bis)
 
                dev->iobase = ETH_BASE + (index * ETH_PORT_OFFSET);
                dev->priv = (void *)(phy_address[index]);
-               dev->eo->init = tsi108_eth_probe;
-               dev->eo->halt = tsi108_eth_halt;
-               dev->eo->send = tsi108_eth_send;
-               dev->eo->recv = tsi108_eth_recv;
+               dev->eo = &tsi108_eth_ops;
 
                eth_register(dev);
        }
-- 
1.7.2.5

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to