From patchwork Fri Nov 2 17:18:29 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [U-Boot,RFC,37/50] net: pcnet: Pull out init of struct eth_ops Date: Fri, 02 Nov 2012 07:18:29 -0000 From: Tomas Hlavacek X-Patchwork-Id: 196654 Message-Id: <1351876722-5183-38-git-send-email-tmshlvck@gmail.com> To: u-boot@lists.denx.de Cc: marex@denx.de 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 --- drivers/net/pcnet.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/net/pcnet.c b/drivers/net/pcnet.c index 35254c3..8bb8c67 100644 --- a/drivers/net/pcnet.c +++ b/drivers/net/pcnet.c @@ -154,6 +154,12 @@ static struct pci_device_id supported[] = { {} }; +static struct eth_ops pcnet_ops = { + .init = pcnet_init, + .halt = pcnet_halt, + .send = pcnet_send, + .recv = pcnet_recv +}; int pcnet_initialize (bd_t * bis) { @@ -216,12 +222,9 @@ int pcnet_initialize (bd_t * bis) } /* - * Setup device structure and register the driver. + * Setup device ops and register the driver. */ - dev->eo->init = pcnet_init; - dev->eo->halt = pcnet_halt; - dev->eo->send = pcnet_send; - dev->eo->recv = pcnet_recv; + dev->eo = &pcnet_ops; eth_register (dev); }