diff mbox

[23/45] ibmtr: convert to net_device_ops

Message ID 20090109230138.406678573@linux-foundation.org
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

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



--
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
diff mbox

Patch

--- a/drivers/net/tokenring/ibmtr.c	2009-01-09 13:54:29.000000000 -0800
+++ b/drivers/net/tokenring/ibmtr.c	2009-01-09 13:55:28.000000000 -0800
@@ -815,17 +815,21 @@  static unsigned char __devinit get_sram_
 
 /*****************************************************************************/
 
+static const struct net_device_ops trdev_netdev_ops = {
+	.ndo_open		= tok_open,
+	.ndo_stop		= tok_close,
+	.ndo_start_xmit		= tok_send_packet,
+	.ndo_set_multicast_list = tok_set_multicast_list,
+	.ndo_change_mtu		= ibmtr_change_mtu,
+};
+
 static int __devinit trdev_init(struct net_device *dev)
 {
 	struct tok_info *ti = netdev_priv(dev);
 
 	SET_PAGE(ti->srb_page);
         ti->open_failure = NO    ;
-	dev->open = tok_open;
-	dev->stop = tok_close;
-	dev->hard_start_xmit = tok_send_packet;
-	dev->set_multicast_list = tok_set_multicast_list;
-	dev->change_mtu = ibmtr_change_mtu;
+ 	dev->netdev_ops = &trdev_netdev_ops;
 
 	return 0;
 }