diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2009-03-26 11:11:36 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-27 03:46:51 -0400 |
commit | cb0c7005d2dd20499c0855bfcb05272a4d206d23 (patch) | |
tree | 743d7bc78d3551db9e081e808984898b727b71ba /drivers/net/at1700.c | |
parent | 8afb1cebf5e7fde4a1bddacb559bda8526e64144 (diff) |
netdev: convert at1700 to net_device_ops
Remove unneeded memset (alloc_etherdev does it already).
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/at1700.c')
-rw-r--r-- | drivers/net/at1700.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/net/at1700.c b/drivers/net/at1700.c index ced70799b898..18b566ad4fd1 100644 --- a/drivers/net/at1700.c +++ b/drivers/net/at1700.c | |||
@@ -249,6 +249,17 @@ out: | |||
249 | return ERR_PTR(err); | 249 | return ERR_PTR(err); |
250 | } | 250 | } |
251 | 251 | ||
252 | static const struct net_device_ops at1700_netdev_ops = { | ||
253 | .ndo_open = net_open, | ||
254 | .ndo_stop = net_close, | ||
255 | .ndo_start_xmit = net_send_packet, | ||
256 | .ndo_set_multicast_list = set_rx_mode, | ||
257 | .ndo_tx_timeout = net_tx_timeout, | ||
258 | .ndo_change_mtu = eth_change_mtu, | ||
259 | .ndo_set_mac_address = eth_mac_addr, | ||
260 | .ndo_validate_addr = eth_validate_addr, | ||
261 | }; | ||
262 | |||
252 | /* The Fujitsu datasheet suggests that the NIC be probed for by checking its | 263 | /* The Fujitsu datasheet suggests that the NIC be probed for by checking its |
253 | "signature", the default bit pattern after a reset. This *doesn't* work -- | 264 | "signature", the default bit pattern after a reset. This *doesn't* work -- |
254 | there is no way to reset the bus interface without a complete power-cycle! | 265 | there is no way to reset the bus interface without a complete power-cycle! |
@@ -448,13 +459,7 @@ found: | |||
448 | if (net_debug) | 459 | if (net_debug) |
449 | printk(version); | 460 | printk(version); |
450 | 461 | ||
451 | memset(lp, 0, sizeof(struct net_local)); | 462 | dev->netdev_ops = &at1700_netdev_ops; |
452 | |||
453 | dev->open = net_open; | ||
454 | dev->stop = net_close; | ||
455 | dev->hard_start_xmit = net_send_packet; | ||
456 | dev->set_multicast_list = &set_rx_mode; | ||
457 | dev->tx_timeout = net_tx_timeout; | ||
458 | dev->watchdog_timeo = TX_TIMEOUT; | 463 | dev->watchdog_timeo = TX_TIMEOUT; |
459 | 464 | ||
460 | spin_lock_init(&lp->lock); | 465 | spin_lock_init(&lp->lock); |