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> --- arch/powerpc/cpu/mpc8260/ether_scc.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/cpu/mpc8260/ether_scc.c b/arch/powerpc/cpu/mpc8260/ether_scc.c index e56bfdf..5afe905 100644 --- a/arch/powerpc/cpu/mpc8260/ether_scc.c +++ b/arch/powerpc/cpu/mpc8260/ether_scc.c @@ -364,6 +364,13 @@ static void sec_restart(void) } #endif +static struct eth_ops sec_ops = { + .init = sec_init, + .halt = sec_halt, + .send = sec_send, + .recv = sec_rx +}; + int mpc82xx_scc_enet_initialize(bd_t *bis) { struct eth_device *dev; @@ -372,10 +379,7 @@ int mpc82xx_scc_enet_initialize(bd_t *bis) memset(dev, 0, sizeof *dev); sprintf(dev->name, "SCC"); - dev->eo->init = sec_init; - dev->eo->halt = sec_halt; - dev->eo->send = sec_send; - dev->eo->recv = sec_rx; + dev->eo = &sec_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