diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2009-03-26 11:11:44 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-27 03:46:55 -0400 |
commit | 6d1ec7812d6350409ecfe7f6dded3a6c801b89d3 (patch) | |
tree | ea063a9ac0f403bf8b6f4d70e0b4f24bd995bd4a /drivers/net/eth16i.c | |
parent | 15d23e7a9e02c8ecbbf9a855e626707ba839135a (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.c | 18 |
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 | ||
478 | static 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 | |||
478 | static int __init eth16i_probe1(struct net_device *dev, int ioaddr) | 489 | static 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 = ð16i_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 | ||