From patchwork Wed Nov 21 13:23:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [U-Boot,v2,43/67] net: tsi108_eth: Pull out init of struct eth_ops From: Tomas Hlavacek X-Patchwork-Id: 200725 Message-Id: <1353504238-11277-44-git-send-email-tmshlvck@gmail.com> To: u-boot@lists.denx.de Cc: marex@denx.de Date: Wed, 21 Nov 2012 14:23:34 +0100 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 --- 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); }