@@ -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);
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> --- arch/powerpc/cpu/mpc8260/ether_scc.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-)