Patchwork [4/5] claw: convert to net_device_ops

login
register
mail settings
Submitter frank.blaschka@de.ibm.com
Date Jan. 9, 2009, 1:43 p.m.
Message ID <20090109134442.878297000@de.ibm.com>
Download mbox | patch
Permalink /patch/17516/
State Accepted
Delegated to: David Miller
Headers show

Comments

frank.blaschka@de.ibm.com - Jan. 9, 2009, 1:43 p.m.
From: Frank Blaschka <frank.blaschka@de.ibm.com>

claw convert to net_device_ops.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com
---
 drivers/s390/net/claw.c |   14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)
David Miller - Jan. 10, 2009, 7:08 a.m.
From: frank.blaschka@de.ibm.com
Date: Fri, 09 Jan 2009 14:43:59 +0100

> From: Frank Blaschka <frank.blaschka@de.ibm.com>
> 
> claw convert to net_device_ops.
> 
> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com

Applied.
--
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

Index: git_linus/drivers/s390/net/claw.c
===================================================================
--- git_linus.orig/drivers/s390/net/claw.c
+++ git_linus/drivers/s390/net/claw.c
@@ -2816,22 +2816,26 @@  claw_free_netdevice(struct net_device * 
  * Initialize everything of the net device except the name and the
  * channel structs.
  */
+static const struct net_device_ops claw_netdev_ops = {
+	.ndo_open		= claw_open,
+	.ndo_stop		= claw_release,
+	.ndo_get_stats		= claw_stats,
+	.ndo_start_xmit		= claw_tx,
+	.ndo_change_mtu		= claw_change_mtu,
+};
+
 static void
 claw_init_netdevice(struct net_device * dev)
 {
 	CLAW_DBF_TEXT(2, setup, "init_dev");
 	CLAW_DBF_TEXT_(2, setup, "%s", dev->name);
 	dev->mtu = CLAW_DEFAULT_MTU_SIZE;
-	dev->hard_start_xmit = claw_tx;
-	dev->open = claw_open;
-	dev->stop = claw_release;
-	dev->get_stats = claw_stats;
-	dev->change_mtu = claw_change_mtu;
 	dev->hard_header_len = 0;
 	dev->addr_len = 0;
 	dev->type = ARPHRD_SLIP;
 	dev->tx_queue_len = 1300;
 	dev->flags = IFF_POINTOPOINT | IFF_NOARP;
+	dev->netdev_ops = &claw_netdev_ops;
 	CLAW_DBF_TEXT(2, setup, "initok");
 	return;
 }