@@ -207,6 +207,13 @@ static struct pci_device_id supported[] = {
{ }
};
+static struct eth_ops dc21x4x_ops = {
+ .init = dc21x4x_init,
+ .halt = dc21x4x_halt,
+ .send = dc21x4x_send,
+ .recv = dc21x4x_recv
+};
+
int dc21x4x_initialize(bd_t *bis)
{
int idx=0;
@@ -299,11 +306,8 @@ int dc21x4x_initialize(bd_t *bis)
#else
dev->iobase = pci_mem_to_phys(devbusfn, iobase);
#endif
- dev->priv = (void*) devbusfn;
- dev->eo->init = dc21x4x_init;
- dev->eo->halt = dc21x4x_halt;
- dev->eo->send = dc21x4x_send;
- dev->eo->recv = dc21x4x_recv;
+ dev->priv = (void *) devbusfn;
+ dev->eo = &dc21x4x_ops;
/* Ensure we're not sleeping. */
pci_write_config_byte(devbusfn, PCI_CFDA_PSM, WAKEUP);
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/net/dc2114x.c | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-)