@@ -294,6 +294,14 @@ OUTL(struct eth_device *dev, int command, u_long addr)
*(vu_long *) ((addr + dev->iobase)) = cpu_to_le32(command);
}
+static struct eth_ops ns8382x_ops = {
+ .init = ns8382x_init,
+ .halt = ns8382x_disable,
+ .send = ns8382x_send,
+ .recv = ns8382x_poll
+};
+
+
/* Function: ns8382x_initialize
* Description: Retrieves the MAC address of the card, and sets up some
* globals required by other routines, and initializes the NIC, making it
@@ -346,10 +354,7 @@ ns8382x_initialize(bd_t * bis)
sprintf(dev->name, "dp8382x#%d", card_number);
dev->iobase = bus_to_phys(iobase);
dev->priv = (void *) devno;
- dev->eo->init = ns8382x_init;
- dev->eo->halt = ns8382x_disable;
- dev->eo->send = ns8382x_send;
- dev->eo->recv = ns8382x_poll;
+ dev->eo = &ns8382x_ops;
/* ns8382x has a non-standard PM control register
* in PCI config space. Some boards apparently need
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/ns8382x.c | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-)