@@ -236,6 +236,13 @@ static int ftmac100_send(struct eth_device *dev, void *packet, int length)
return 0;
}
+static struct eth_ops ftmac100_ops = {
+ .init = ftmac100_init,
+ .halt = ftmac100_halt,
+ .send = ftmac100_send,
+ .recv = ftmac100_recv
+};
+
int ftmac100_initialize (bd_t *bd)
{
struct eth_device *dev;
@@ -260,10 +267,7 @@ int ftmac100_initialize (bd_t *bd)
sprintf (dev->name, "FTMAC100");
dev->iobase = CONFIG_FTMAC100_BASE;
- dev->eo->init = ftmac100_init;
- dev->eo->halt = ftmac100_halt;
- dev->eo->send = ftmac100_send;
- dev->eo->recv = ftmac100_recv;
+ dev->eo = &ftmac100_ops;
dev->priv = priv;
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/ftmac100.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-)