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/inca-ip_sw.c | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/net/inca-ip_sw.c b/drivers/net/inca-ip_sw.c index 216122d..ab91553 100644 --- a/drivers/net/inca-ip_sw.c +++ b/drivers/net/inca-ip_sw.c @@ -165,6 +165,12 @@ static void inca_init_switch_chip(void); static void inca_dma_init(void); static int inca_amdix(void); +static struct eth_ops inca_switch_ops = { + .init = inca_switch_init, + .halt = inca_switch_halt, + .send = inca_switch_send, + .recv = inca_switch_recv +}; int inca_switch_initialize(bd_t * bis) { @@ -189,10 +195,7 @@ int inca_switch_initialize(bd_t * bis) #endif sprintf(dev->name, "INCA-IP Switch"); - dev->eo->init = inca_switch_init; - dev->eo->halt = inca_switch_halt; - dev->eo->send = inca_switch_send; - dev->eo->recv = inca_switch_recv; + dev->eo = &inca_switch_ops; eth_register(dev); -- 1.7.2.5 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot