@@ -1361,6 +1361,13 @@ static int uec_recv(struct eth_device* dev)
return 1;
}
+static struct eth_ops uec_ops = {
+ .init = uec_init,
+ .halt = uec_halt,
+ .send = uec_send,
+ .recv = uec_recv
+};
+
int uec_initialize(bd_t *bis, uec_info_t *uec_info)
{
struct eth_device *dev;
@@ -1394,10 +1401,7 @@ int uec_initialize(bd_t *bis, uec_info_t *uec_info)
sprintf(dev->name, "UEC%d", uec_info->uf_info.ucc_num);
dev->iobase = 0;
dev->priv = (void *)uec;
- dev->eo->init = uec_init;
- dev->eo->halt = uec_halt;
- dev->eo->send = uec_send;
- dev->eo->recv = uec_recv;
+ dev->eo = &uec_ops;
/* Clear the ethnet address */
for (i = 0; i < 6; i++)
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 <tmshlvck@gmail.com> --- drivers/qe/uec.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-)