Commit 6d1ec781 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller

netdev: convert eth16i to net_device_ops

Also, get rid of unnecessary memset.
Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 15d23e7a
...@@ -475,6 +475,17 @@ out: ...@@ -475,6 +475,17 @@ out:
} }
#endif #endif
static const struct net_device_ops eth16i_netdev_ops = {
.ndo_open = eth16i_open,
.ndo_stop = eth16i_close,
.ndo_start_xmit = eth16i_tx,
.ndo_set_multicast_list = eth16i_multicast,
.ndo_tx_timeout = eth16i_timeout,
.ndo_change_mtu = eth_change_mtu,
.ndo_set_mac_address = eth_mac_addr,
.ndo_validate_addr = eth_validate_addr,
};
static int __init eth16i_probe1(struct net_device *dev, int ioaddr) static int __init eth16i_probe1(struct net_device *dev, int ioaddr)
{ {
struct eth16i_local *lp = netdev_priv(dev); struct eth16i_local *lp = netdev_priv(dev);
...@@ -549,12 +560,7 @@ static int __init eth16i_probe1(struct net_device *dev, int ioaddr) ...@@ -549,12 +560,7 @@ static int __init eth16i_probe1(struct net_device *dev, int ioaddr)
BITCLR(ioaddr + CONFIG_REG_1, POWERUP); BITCLR(ioaddr + CONFIG_REG_1, POWERUP);
/* Initialize the device structure */ /* Initialize the device structure */
memset(lp, 0, sizeof(struct eth16i_local)); dev->netdev_ops = &eth16i_netdev_ops;
dev->open = eth16i_open;
dev->stop = eth16i_close;
dev->hard_start_xmit = eth16i_tx;
dev->set_multicast_list = eth16i_multicast;
dev->tx_timeout = eth16i_timeout;
dev->watchdog_timeo = TX_TIMEOUT; dev->watchdog_timeo = TX_TIMEOUT;
spin_lock_init(&lp->lock); spin_lock_init(&lp->lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment