@@ -283,6 +283,13 @@ static void au1x00_halt(struct eth_device* dev){
*macen = 0;
}
+static struct eth_ops au1x00_ops = {
+ .init = au1x00_init,
+ .halt = au1x00_halt,
+ .send = au1x00_send,
+ .recv = au1x00_recv
+};
+
int au1x00_enet_initialize(bd_t *bis){
struct eth_device* dev;
@@ -296,10 +303,7 @@ int au1x00_enet_initialize(bd_t *bis){
sprintf(dev->name, "Au1X00 ethernet");
dev->iobase = 0;
dev->priv = 0;
- dev->eo->init = au1x00_init;
- dev->eo->halt = au1x00_halt;
- dev->eo->send = au1x00_send;
- dev->eo->recv = au1x00_recv;
+ dev->eo = &au1x00_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> --- arch/mips/cpu/mips32/au1x00/au1x00_eth.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-)