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/mpc512x_fec.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/net/mpc512x_fec.c b/drivers/net/mpc512x_fec.c index 4aa3b28..d10a70a 100644 --- a/drivers/net/mpc512x_fec.c +++ b/drivers/net/mpc512x_fec.c @@ -608,6 +608,13 @@ static int mpc512x_fec_recv (struct eth_device *dev) return frame_length; } +static struct eth_ops mpc512x_fec_ops = { + .init = mpc512x_fec_init, + .halt = mpc512x_fec_halt, + .send = mpc512x_fec_send, + .recv = mpc512x_fec_recv +}; + /********************************************************************/ int mpc512x_fec_initialize (bd_t * bis) { @@ -629,10 +636,7 @@ int mpc512x_fec_initialize (bd_t * bis) # endif dev->priv = (void *)fec; dev->iobase = (int)&im->fec; - dev->eo->init = mpc512x_fec_init; - dev->eo->halt = mpc512x_fec_halt; - dev->eo->send = mpc512x_fec_send; - dev->eo->recv = mpc512x_fec_recv; + dev->eo = &mpc512x_fec_ops; sprintf (dev->name, "FEC"); eth_register (dev); -- 1.7.2.5 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot