@@ -439,6 +439,13 @@ int ep93xx_miiphy_initialize(bd_t * const bd)
}
#endif
+static struct eth_dev ep93xx_eth_ops = {
+ .init = ep93xx_eth_open,
+ .halt = ep93xx_eth_close,
+ .send = ep93xx_eth_send_packet,
+ .recv = ep93xx_eth_rcv_packet
+};
+
/**
* Initialize the EP93xx MAC. The MAC hardware is reset. Buffers are
* allocated, if necessary, for the TX and RX descriptor and status queues,
@@ -499,10 +506,7 @@ int ep93xx_eth_initialize(u8 dev_num, int base_addr)
dev->iobase = base_addr;
dev->priv = priv;
- dev->eo->init = ep93xx_eth_open;
- dev->eo->halt = ep93xx_eth_close;
- dev->eo->send = ep93xx_eth_send_packet;
- dev->eo->recv = ep93xx_eth_rcv_packet;
+ dev->eo = &ep93xx_eth_ops;
sprintf(dev->name, "ep93xx_eth-%hu", dev_num);
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/ep93xx_eth.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-)