@@ -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);
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 <tmshlvck@gmail.com> --- drivers/net/eepro100.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-)