Patchwork [3/4] netiucv: convert to net_device_ops

login
register
mail settings
Submitter frank.blaschka@de.ibm.com
Date Jan. 9, 2009, 9:01 a.m.
Message ID <20090109090221.873883000@de.ibm.com>
Download mbox | patch
Permalink /patch/17482/
State Superseded
Delegated to: David Miller
Headers show

Comments

frank.blaschka@de.ibm.com - Jan. 9, 2009, 9:01 a.m.
From: Frank Blaschka <frank.blaschka@de.ibm.com>

netiucv convert to net_device_ops.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
---
 drivers/s390/net/netiucv.c |   14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

Patch

Index: git_linus/drivers/s390/net/netiucv.c
===================================================================
--- git_linus.orig/drivers/s390/net/netiucv.c
+++ git_linus/drivers/s390/net/netiucv.c
@@ -1876,20 +1876,24 @@  static void netiucv_free_netdevice(struc
 /**
  * Initialize a net device. (Called from kernel in alloc_netdev())
  */
+static struct net_device_ops netiucv_netdev_ops = {
+	.ndo_open		= netiucv_open,
+	.ndo_stop		= netiucv_close,
+	.ndo_get_stats		= netiucv_stats,
+	.ndo_start_xmit		= netiucv_tx,
+	.ndo_change_mtu	   	= netiucv_change_mtu,
+};
+
 static void netiucv_setup_netdevice(struct net_device *dev)
 {
 	dev->mtu	         = NETIUCV_MTU_DEFAULT;
-	dev->hard_start_xmit     = netiucv_tx;
-	dev->open	         = netiucv_open;
-	dev->stop	         = netiucv_close;
-	dev->get_stats	         = netiucv_stats;
-	dev->change_mtu          = netiucv_change_mtu;
 	dev->destructor          = netiucv_free_netdevice;
 	dev->hard_header_len     = NETIUCV_HDRLEN;
 	dev->addr_len            = 0;
 	dev->type                = ARPHRD_SLIP;
 	dev->tx_queue_len        = NETIUCV_QUEUELEN_DEFAULT;
 	dev->flags	         = IFF_POINTOPOINT | IFF_NOARP;
+	dev->netdev_ops		 = &netiucv_netdev_ops;
 }
 
 /**