@@ -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);
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 <tmshlvck@gmail.com> --- drivers/net/mpc512x_fec.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)