Patchwork [05/45] lec: convert to net_device_ops

login
register
mail settings
Submitter Stephen Hemminger
Date Jan. 9, 2009, 11:01 p.m.
Message ID <20090109230137.077316321@linux-foundation.org>
Download mbox | patch
Permalink /patch/17648/
State Accepted
Delegated to: David Miller
Headers show

Comments

Stephen Hemminger - Jan. 9, 2009, 11:01 p.m.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

---
 net/atm/lec.c |   20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

--- a/net/atm/lec.c	2009-01-09 10:15:14.000000000 -0800
+++ b/net/atm/lec.c	2009-01-09 10:15:23.000000000 -0800
@@ -667,17 +667,19 @@  static void lec_set_multicast_list(struc
 	return;
 }
 
+static const struct net_device_ops lec_netdev_ops = {
+	.ndo_open		= lec_open,
+	.ndo_stop		= lec_close,
+	.ndo_start_xmit		= lec_start_xmit,
+	.ndo_change_mtu		= lec_change_mtu,
+	.ndo_tx_timeout		= lec_tx_timeout,
+	.ndo_set_multicast_list	= lec_set_multicast_list,
+};
+
+
 static void lec_init(struct net_device *dev)
 {
-	dev->change_mtu = lec_change_mtu;
-	dev->open = lec_open;
-	dev->stop = lec_close;
-	dev->hard_start_xmit = lec_start_xmit;
-	dev->tx_timeout = lec_tx_timeout;
-
-	dev->get_stats = lec_get_stats;
-	dev->set_multicast_list = lec_set_multicast_list;
-	dev->do_ioctl = NULL;
+	dev->netdev_ops = &lec_netdev_ops;
 	printk("%s: Initialized!\n", dev->name);
 }