Patchwork [5/5] declance: convert to net_device_ops

login
register
mail settings
Submitter Alexander Beregalov
Date April 15, 2009, 4:30 a.m.
Message ID <1239769825-12413-5-git-send-email-a.beregalov@gmail.com>
Download mbox | patch
Permalink /patch/25963/
State Accepted
Delegated to: David Miller
Headers show

Comments

Alexander Beregalov - April 15, 2009, 4:30 a.m.
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
---
 drivers/net/declance.c |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)
David Miller - April 15, 2009, 4:58 a.m.
From: Alexander Beregalov <a.beregalov@gmail.com>
Date: Wed, 15 Apr 2009 08:30:25 +0400

> Signed-off-by: Alexander Beregalov <a.beregalov@gmail.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

diff --git a/drivers/net/declance.c b/drivers/net/declance.c
index 861c867..b62405a 100644
--- a/drivers/net/declance.c
+++ b/drivers/net/declance.c
@@ -1010,6 +1010,17 @@  static void lance_set_multicast_retry(unsigned long _opaque)
 	lance_set_multicast(dev);
 }
 
+static const struct net_device_ops lance_netdev_ops = {
+	.ndo_open		= lance_open,
+	.ndo_stop		= lance_close,
+	.ndo_start_xmit		= lance_start_xmit,
+	.ndo_tx_timeout		= lance_tx_timeout,
+	.ndo_set_multicast_list	= lance_set_multicast,
+	.ndo_change_mtu		= eth_change_mtu,
+	.ndo_validate_addr	= eth_validate_addr,
+	.ndo_set_mac_address	= eth_mac_addr,
+};
+
 static int __init dec_lance_probe(struct device *bdev, const int type)
 {
 	static unsigned version_printed;
@@ -1223,12 +1234,8 @@  static int __init dec_lance_probe(struct device *bdev, const int type)
 
 	printk(", addr = %pM, irq = %d\n", dev->dev_addr, dev->irq);
 
-	dev->open = &lance_open;
-	dev->stop = &lance_close;
-	dev->hard_start_xmit = &lance_start_xmit;
-	dev->tx_timeout = &lance_tx_timeout;
+	dev->netdev_ops = &lance_netdev_ops;
 	dev->watchdog_timeo = 5*HZ;
-	dev->set_multicast_list = &lance_set_multicast;
 
 	/* lp->ll is the location of the registers for lance card */
 	lp->ll = ll;