From patchwork Wed Nov 21 13:23:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [U-Boot,v2,54/67] net: mpc85xx_fec: Pull out init of struct eth_ops From: Tomas Hlavacek X-Patchwork-Id: 200729 Message-Id: <1353504238-11277-55-git-send-email-tmshlvck@gmail.com> To: u-boot@lists.denx.de Cc: marex@denx.de Date: Wed, 21 Nov 2012 14:23:45 +0100 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 --- arch/powerpc/cpu/mpc85xx/ether_fcc.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/cpu/mpc85xx/ether_fcc.c b/arch/powerpc/cpu/mpc85xx/ether_fcc.c index 3b9eafa..f3c188d 100644 --- a/arch/powerpc/cpu/mpc85xx/ether_fcc.c +++ b/arch/powerpc/cpu/mpc85xx/ether_fcc.c @@ -435,6 +435,13 @@ static void fec_halt(struct eth_device* dev) } } +static struct eth_ops fec_ops = { + .init = fec_init, + .halt = fec_halt, + .send = fec_send, + .recv = fec_recv +}; + int fec_initialize(bd_t *bis) { struct eth_device* dev; @@ -448,10 +455,7 @@ int fec_initialize(bd_t *bis) sprintf(dev->name, "FCC%d", ether_fcc_info[i].ether_index + 1); dev->priv = ðer_fcc_info[i]; - dev->eo->init = fec_init; - dev->eo->halt = fec_halt; - dev->eo->send = fec_send; - dev->eo->recv = fec_recv; + dev->eo = &fec_ops; eth_register(dev);