Patchwork [21/22] eql: convert to net_device_ops

login
register
mail settings
Submitter stephen hemminger
Date Nov. 21, 2008, 11:21 p.m.
Message ID <20081121232240.672345637@vyatta.com>
Download mbox | patch
Permalink /patch/10155/
State Accepted
Delegated to: David Miller
Headers show

Comments

stephen hemminger - Nov. 21, 2008, 11:21 p.m.
Convert driver to new net_device_ops. Compile tested only.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
David Miller - Nov. 22, 2008, 1:38 a.m.
From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 21 Nov 2008 15:21:59 -0800

> Convert driver to new net_device_ops. Compile tested only.
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.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

--- a/drivers/net/eql.c	2008-11-21 14:57:44.000000000 -0800
+++ b/drivers/net/eql.c	2008-11-21 14:59:55.000000000 -0800
@@ -162,6 +162,13 @@  static void eql_timer(unsigned long para
 static char version[] __initdata =
 	"Equalizer2002: Simon Janes (simon@ncm.com) and David S. Miller (davem@redhat.com)\n";
 
+static const struct net_device_ops eql_netdev_ops = {
+	.ndo_open	= eql_open,
+	.ndo_stop	= eql_close,
+	.ndo_do_ioctl	= eql_ioctl,
+	.ndo_start_xmit	= eql_slave_xmit,
+};
+
 static void __init eql_setup(struct net_device *dev)
 {
 	equalizer_t *eql = netdev_priv(dev);
@@ -175,10 +182,7 @@  static void __init eql_setup(struct net_
 	INIT_LIST_HEAD(&eql->queue.all_slaves);
 	eql->queue.master_dev	= dev;
 
-	dev->open		= eql_open;
-	dev->stop		= eql_close;
-	dev->do_ioctl		= eql_ioctl;
-	dev->hard_start_xmit	= eql_slave_xmit;
+	dev->netdev_ops		= &eql_netdev_ops;
 
 	/*
 	 *	Now we undo some of the things that eth_setup does