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/ks8695eth.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/net/ks8695eth.c b/drivers/net/ks8695eth.c index b0703ef..4a5a27e 100644 --- a/drivers/net/ks8695eth.c +++ b/drivers/net/ks8695eth.c @@ -220,6 +220,13 @@ static int ks8695_eth_send(struct eth_device *dev, void *packet, int len) /****************************************************************************/ +static struct eth_ops ks8695_eth_ops = { + .init = ks8695_eth_init, + .halt = ks8695_eth_halt, + .send = ks8695_eth_send, + .recv = ks8695_eth_recv +}; + int ks8695_eth_initialize(void) { struct eth_device *dev; @@ -230,10 +237,7 @@ int ks8695_eth_initialize(void) memset(dev, 0, sizeof(*dev)); dev->iobase = KS8695_IO_BASE + KS8695_LAN_DMA_TX; - dev->eo->init = ks8695_eth_init; - dev->eo->halt = ks8695_eth_halt; - dev->eo->send = ks8695_eth_send; - dev->eo->recv = ks8695_eth_recv; + dev->eo = &ks8695_eth_ops; strcpy(dev->name, "ks8695eth"); eth_register(dev); -- 1.7.2.5 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot