@@ -664,6 +664,14 @@ gt6426x_eth_probe(void *v, bd_t *bis)
return 1;
}
+
+static struct eth_ops gt6426x_eth_ops = {
+ .init = (void *) gt6426x_eth_probe,
+ .halt = (void *) gt6426x_eth_reset,
+ .send = (void *) gt6426x_eth_transmit,
+ .recv = (void *) gt6426x_eth_poll
+};
+
/* enter all the galileo ethernet devs into MULTI-BOOT */
void
gt6426x_eth_initialize(bd_t *bis)
@@ -720,10 +728,7 @@ gt6426x_eth_initialize(bd_t *bis)
s = (*e) ? e+1 : e;
}
- dev->eo->init = (void *)gt6426x_eth_probe;
- dev->eo->halt = (void *)gt6426x_eth_reset;
- dev->eo->send = (void *)gt6426x_eth_transmit;
- dev->eo->recv = (void *)gt6426x_eth_poll;
+ dev->eo = >6426x_eth_ops;
p = calloc( sizeof(*p), 1 );
dev->priv = (void*)p;
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> --- board/evb64260/eth.c | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-)