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 <tmshl...@gmail.com> --- drivers/net/rtl8139.c | 18 +++++++++++------- 1 files changed, 11 insertions(+), 7 deletions(-) diff --git a/drivers/net/rtl8139.c b/drivers/net/rtl8139.c index ed02cf6..0e4e5d5 100644 --- a/drivers/net/rtl8139.c +++ b/drivers/net/rtl8139.c @@ -200,6 +200,16 @@ static struct pci_device_id supported[] = { {} }; +static struct eth_ops rtl8139_ops = { + .init = rtl8139_probe, + .halt = rtl_disable, + .send = rtl_transmit, + .recv = rtl_poll, +#ifdef CONFIG_MCAST_TFTP + .mcast = rtl_bcast_addr +#endif +}; + int rtl8139_initialize(bd_t *bis) { pci_dev_t devno; @@ -229,13 +239,7 @@ int rtl8139_initialize(bd_t *bis) dev->priv = (void *) devno; dev->iobase = (int)bus_to_phys(iobase); - dev->eo->init = rtl8139_probe; - dev->eo->halt = rtl_disable; - dev->eo->send = rtl_transmit; - dev->eo->recv = rtl_poll; -#ifdef CONFIG_MCAST_TFTP - dev->eo->mcast = rtl_bcast_addr; -#endif + dev->eo = &rtl8139_ops; eth_register (dev); -- 1.7.2.5 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot