aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/ns83820.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c
index 4bb64415437f..46b0772489e4 100644
--- a/drivers/net/ns83820.c
+++ b/drivers/net/ns83820.c
@@ -1948,7 +1948,19 @@ static void ns83820_probe_phy(struct net_device *ndev)
1948} 1948}
1949#endif 1949#endif
1950 1950
1951static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_device_id *id) 1951static const struct net_device_ops netdev_ops = {
1952 .ndo_open = ns83820_open,
1953 .ndo_stop = ns83820_stop,
1954 .ndo_start_xmit = ns83820_hard_start_xmit,
1955 .ndo_get_stats = ns83820_get_stats,
1956 .ndo_change_mtu = ns83820_change_mtu,
1957 .ndo_set_multicast_list = ns83820_set_multicast,
1958 .ndo_validate_addr = eth_validate_addr,
1959 .ndo_tx_timeout = ns83820_tx_timeout,
1960};
1961
1962static int __devinit ns83820_init_one(struct pci_dev *pci_dev,
1963 const struct pci_device_id *id)
1952{ 1964{
1953 struct net_device *ndev; 1965 struct net_device *ndev;
1954 struct ns83820 *dev; 1966 struct ns83820 *dev;
@@ -2040,14 +2052,8 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_
2040 ndev->name, le32_to_cpu(readl(dev->base + 0x22c)), 2052 ndev->name, le32_to_cpu(readl(dev->base + 0x22c)),
2041 pci_dev->subsystem_vendor, pci_dev->subsystem_device); 2053 pci_dev->subsystem_vendor, pci_dev->subsystem_device);
2042 2054
2043 ndev->open = ns83820_open; 2055 ndev->netdev_ops = &netdev_ops;
2044 ndev->stop = ns83820_stop;
2045 ndev->hard_start_xmit = ns83820_hard_start_xmit;
2046 ndev->get_stats = ns83820_get_stats;
2047 ndev->change_mtu = ns83820_change_mtu;
2048 ndev->set_multicast_list = ns83820_set_multicast;
2049 SET_ETHTOOL_OPS(ndev, &ops); 2056 SET_ETHTOOL_OPS(ndev, &ops);
2050 ndev->tx_timeout = ns83820_tx_timeout;
2051 ndev->watchdog_timeo = 5 * HZ; 2057 ndev->watchdog_timeo = 5 * HZ;
2052 pci_set_drvdata(pci_dev, ndev); 2058 pci_set_drvdata(pci_dev, ndev);
2053 2059