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/mpc8xx/scc.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/cpu/mpc8xx/scc.c b/arch/powerpc/cpu/mpc8xx/scc.c index 801c689..1d154f5 100644 --- a/arch/powerpc/cpu/mpc8xx/scc.c +++ b/arch/powerpc/cpu/mpc8xx/scc.c @@ -70,6 +70,13 @@ static int scc_recv(struct eth_device* dev); static int scc_init (struct eth_device* dev, bd_t * bd); static void scc_halt(struct eth_device* dev); +static struct eth_ops sec_ops = { + .init = scc_init, + .halt = scc_halt, + .send = scc_send, + .recv = scc_recv +}; + int scc_initialize(bd_t *bis) { struct eth_device* dev; @@ -80,10 +87,7 @@ int scc_initialize(bd_t *bis) sprintf(dev->name, "SCC"); dev->iobase = 0; dev->priv = 0; - dev->eo->init = scc_init; - dev->eo->halt = scc_halt; - dev->eo->send = scc_send; - dev->eo->recv = scc_recv; + 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