diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2009-03-26 11:11:19 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-27 03:46:41 -0400 |
commit | c2839d433de2fee2216b41ef8222708949bf989f (patch) | |
tree | eb44e7f9754eb88f2ad676fd4c6631f7924aed4d /drivers/net/appletalk | |
parent | 8bbce3f61b63c7502b1d6228d9f59d3c6423a759 (diff) |
appltetalk: convert cops device to net_device ops
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/appletalk')
-rw-r--r-- | drivers/net/appletalk/cops.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/net/appletalk/cops.c b/drivers/net/appletalk/cops.c index 89632c5855f4..7f8325419803 100644 --- a/drivers/net/appletalk/cops.c +++ b/drivers/net/appletalk/cops.c | |||
@@ -258,6 +258,15 @@ out: | |||
258 | return ERR_PTR(err); | 258 | return ERR_PTR(err); |
259 | } | 259 | } |
260 | 260 | ||
261 | static const struct net_device_ops cops_netdev_ops = { | ||
262 | .ndo_open = cops_open, | ||
263 | .ndo_stop = cops_close, | ||
264 | .ndo_start_xmit = cops_send_packet, | ||
265 | .ndo_tx_timeout = cops_timeout, | ||
266 | .ndo_do_ioctl = cops_ioctl, | ||
267 | .ndo_set_multicast_list = set_multicast_list, | ||
268 | }; | ||
269 | |||
261 | /* | 270 | /* |
262 | * This is the real probe routine. Linux has a history of friendly device | 271 | * This is the real probe routine. Linux has a history of friendly device |
263 | * probes on the ISA bus. A good device probes avoids doing writes, and | 272 | * probes on the ISA bus. A good device probes avoids doing writes, and |
@@ -331,15 +340,9 @@ static int __init cops_probe1(struct net_device *dev, int ioaddr) | |||
331 | /* Copy local board variable to lp struct. */ | 340 | /* Copy local board variable to lp struct. */ |
332 | lp->board = board; | 341 | lp->board = board; |
333 | 342 | ||
334 | dev->hard_start_xmit = cops_send_packet; | 343 | dev->netdev_ops = &cops_netdev_ops; |
335 | dev->tx_timeout = cops_timeout; | ||
336 | dev->watchdog_timeo = HZ * 2; | 344 | dev->watchdog_timeo = HZ * 2; |
337 | 345 | ||
338 | dev->open = cops_open; | ||
339 | dev->stop = cops_close; | ||
340 | dev->do_ioctl = cops_ioctl; | ||
341 | dev->set_multicast_list = set_multicast_list; | ||
342 | dev->mc_list = NULL; | ||
343 | 346 | ||
344 | /* Tell the user where the card is and what mode we're in. */ | 347 | /* Tell the user where the card is and what mode we're in. */ |
345 | if(board==DAYNA) | 348 | if(board==DAYNA) |