From patchwork Wed Nov 21 13:23:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [U-Boot,v2,60/67] net: evb64260: Pull out init of struct eth_ops From: Tomas Hlavacek X-Patchwork-Id: 200748 Message-Id: <1353504238-11277-61-git-send-email-tmshlvck@gmail.com> To: u-boot@lists.denx.de Cc: marex@denx.de Date: Wed, 21 Nov 2012 14:23:51 +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 --- board/evb64260/eth.c | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/board/evb64260/eth.c b/board/evb64260/eth.c index 783e0ae..6f4300d 100644 --- a/board/evb64260/eth.c +++ b/board/evb64260/eth.c @@ -664,6 +664,14 @@ gt6426x_eth_probe(void *v, bd_t *bis) return 1; } + +static struct eth_ops gt6426x_eth_ops = { + .init = (void *) gt6426x_eth_probe, + .halt = (void *) gt6426x_eth_reset, + .send = (void *) gt6426x_eth_transmit, + .recv = (void *) gt6426x_eth_poll +}; + /* enter all the galileo ethernet devs into MULTI-BOOT */ void gt6426x_eth_initialize(bd_t *bis) @@ -720,10 +728,7 @@ gt6426x_eth_initialize(bd_t *bis) s = (*e) ? e+1 : e; } - dev->eo->init = (void *)gt6426x_eth_probe; - dev->eo->halt = (void *)gt6426x_eth_reset; - dev->eo->send = (void *)gt6426x_eth_transmit; - dev->eo->recv = (void *)gt6426x_eth_poll; + dev->eo = >6426x_eth_ops; p = calloc( sizeof(*p), 1 ); dev->priv = (void*)p;