From patchwork Wed Nov 21 13:23:07 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [U-Boot,v2,16/67] net: eepro100: Pull out init of struct eth_ops Date: Wed, 21 Nov 2012 03:23:07 -0000 From: Tomas Hlavacek X-Patchwork-Id: 200704 Message-Id: <1353504238-11277-17-git-send-email-tmshlvck@gmail.com> To: u-boot@lists.denx.de Cc: marex@denx.de 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/eepro100.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/net/eepro100.c b/drivers/net/eepro100.c index e3aa720..91d7f0b 100644 --- a/drivers/net/eepro100.c +++ b/drivers/net/eepro100.c @@ -408,6 +408,13 @@ static struct pci_device_id supported[] = { {} }; +static struct eth_ops eepro100_ops = { + .init = eepro100_init, + .halt = eepro100_halt, + .send = eepro100_send, + .recv = eepro100_recv +}; + int eepro100_initialize (bd_t * bis) { pci_dev_t devno; @@ -458,10 +465,7 @@ int eepro100_initialize (bd_t * bis) sprintf (dev->name, "i82559#%d", card_number); dev->priv = (void *) devno; /* this have to come before bus_to_phys() */ dev->iobase = bus_to_phys (iobase); - dev->eo->init = eepro100_init; - dev->eo->halt = eepro100_halt; - dev->eo->send = eepro100_send; - dev->eo->recv = eepro100_recv; + dev->eo = &eepro100_ops; eth_register (dev);