aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/eth16i.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2009-03-26 11:11:44 -0400
committerDavid S. Miller <davem@davemloft.net>2009-03-27 03:46:55 -0400
commit6d1ec7812d6350409ecfe7f6dded3a6c801b89d3 (patch)
treeea063a9ac0f403bf8b6f4d70e0b4f24bd995bd4a /drivers/net/eth16i.c
parent15d23e7a9e02c8ecbbf9a855e626707ba839135a (diff)
netdev: convert eth16i to net_device_ops
Also, get rid of unnecessary memset. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/eth16i.c')
-rw-r--r--drivers/net/eth16i.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/net/eth16i.c b/drivers/net/eth16i.c
index 5c048f2fd74f..0d8b6da046f2 100644
--- a/drivers/net/eth16i.c
+++ b/drivers/net/eth16i.c
@@ -475,6 +475,17 @@ out:
475} 475}
476#endif 476#endif
477 477
478static const struct net_device_ops eth16i_netdev_ops = {
479 .ndo_open = eth16i_open,
480 .ndo_stop = eth16i_close,
481 .ndo_start_xmit = eth16i_tx,
482 .ndo_set_multicast_list = eth16i_multicast,
483 .ndo_tx_timeout = eth16i_timeout,
484 .ndo_change_mtu = eth_change_mtu,
485 .ndo_set_mac_address = eth_mac_addr,
486 .ndo_validate_addr = eth_validate_addr,
487};
488
478static int __init eth16i_probe1(struct net_device *dev, int ioaddr) 489static int __init eth16i_probe1(struct net_device *dev, int ioaddr)
479{ 490{
480 struct eth16i_local *lp = netdev_priv(dev); 491 struct eth16i_local *lp = netdev_priv(dev);
@@ -549,12 +560,7 @@ static int __init eth16i_probe1(struct net_device *dev, int ioaddr)
549 BITCLR(ioaddr + CONFIG_REG_1, POWERUP); 560 BITCLR(ioaddr + CONFIG_REG_1, POWERUP);
550 561
551 /* Initialize the device structure */ 562 /* Initialize the device structure */
552 memset(lp, 0, sizeof(struct eth16i_local)); 563 dev->netdev_ops = &eth16i_netdev_ops;
553 dev->open = eth16i_open;
554 dev->stop = eth16i_close;
555 dev->hard_start_xmit = eth16i_tx;
556 dev->set_multicast_list = eth16i_multicast;
557 dev->tx_timeout = eth16i_timeout;
558 dev->watchdog_timeo = TX_TIMEOUT; 564 dev->watchdog_timeo = TX_TIMEOUT;
559 spin_lock_init(&lp->lock); 565 spin_lock_init(&lp->lock);
560 566