Skip to content

Commit c2839d4

Browse files
Stephen Hemmingerdavem330
authored andcommitted
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>
1 parent 8bbce3f commit c2839d4

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

‎drivers/net/appletalk/cops.c‎

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,15 @@ struct net_device * __init cops_probe(int unit)
258258
return ERR_PTR(err);
259259
}
260260

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+
261270
/*
262271
* This is the real probe routine. Linux has a history of friendly device
263272
* 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)
331340
/* Copy local board variable to lp struct. */
332341
lp->board = board;
333342

334-
dev->hard_start_xmit = cops_send_packet;
335-
dev->tx_timeout = cops_timeout;
343+
dev->netdev_ops = &cops_netdev_ops;
336344
dev->watchdog_timeo = HZ * 2;
337345

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;
343346

344347
/* Tell the user where the card is and what mode we're in. */
345348
if(board==DAYNA)

0 commit comments

Comments
 (0)