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 <tmshl...@gmail.com> --- drivers/net/ax88180.c | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/net/ax88180.c b/drivers/net/ax88180.c index 464f261..fc237ba 100644 --- a/drivers/net/ax88180.c +++ b/drivers/net/ax88180.c @@ -698,6 +698,14 @@ static void ax88180_read_mac_addr (struct eth_device *dev) } } +static struct eth_ops ax88180_ops = { + .init = ax88180_init, + .halt = ax88180_halt, + .send = ax88180_send, + .recv = ax88180_recv +}; + + /* =========================================================================== <<<<<< Exported SubProgram Bodies >>>>>> @@ -725,10 +733,7 @@ int ax88180_initialize (bd_t * bis) sprintf (dev->name, "ax88180"); dev->iobase = AX88180_BASE; dev->priv = priv; - dev->eo->init = ax88180_init; - dev->eo->halt = ax88180_halt; - dev->eo->send = ax88180_send; - dev->eo->recv = ax88180_recv; + dev->eo = &ax88180_ops; priv->BusWidth = BUS_WIDTH_32; priv->PadSize = 3; -- 1.7.2.5 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot