From patchwork Fri Nov 2 17:18:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [U-Boot,RFC,17/50] net: eepro100: Pull out init of struct eth_ops Date: Fri, 02 Nov 2012 07:18:09 -0000 From: Tomas Hlavacek X-Patchwork-Id: 196647 Message-Id: <1351876722-5183-18-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 file 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);