Patchwork [29/45] 3c559: convert to net_device_ops

login
register
mail settings
Submitter Stephen Hemminger
Date Jan. 9, 2009, 11:01 p.m.
Message ID <20090109230138.854601842@linux-foundation.org>
Download mbox | patch
Permalink /patch/17663/
State Accepted
Delegated to: David Miller
Headers show

Comments

Stephen Hemminger - Jan. 9, 2009, 11:01 p.m.
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

Patch

--- a/drivers/net/tokenring/3c359.c	2009-01-05 16:38:58.165576860 -0800
+++ b/drivers/net/tokenring/3c359.c	2009-01-05 16:39:28.730569233 -0800
@@ -274,6 +274,15 @@  static void  xl_ee_write(struct net_devi
 	
 	return ; 
 }
+
+static const struct net_device_ops xl_netdev_ops = {
+	.ndo_open		= xl_open,
+	.ndo_stop		= xl_close,
+	.ndo_start_xmit		= xl_xmit,
+	.ndo_change_mtu		= xl_change_mtu,
+	.ndo_set_multicast_list = xl_set_rx_mode,
+	.ndo_set_mac_address	= xl_set_mac_address,
+};
  
 static int __devinit xl_probe(struct pci_dev *pdev,
 			      const struct pci_device_id *ent) 
@@ -337,13 +346,7 @@  static int __devinit xl_probe(struct pci
 		return i ; 
 	}				
 
-	dev->open=&xl_open;
-	dev->hard_start_xmit=&xl_xmit;
-	dev->change_mtu=&xl_change_mtu;
-	dev->stop=&xl_close;
-	dev->do_ioctl=NULL;
-	dev->set_multicast_list=&xl_set_rx_mode;
-	dev->set_mac_address=&xl_set_mac_address ; 
+	dev->netdev_ops = &xl_netdev_ops;
 	SET_NETDEV_DEV(dev, &pdev->dev);
 
 	pci_set_drvdata(pdev,dev) ;