Commit 6557d7b8599c22819d16497ab6dcc33f2f3027a4
Committed by
David S. Miller
1 parent
bfd82c3582
Exists in
master
and in
7 other branches
ns83820: convert to net_device_ops
Convert driver to new net_device_ops. Compile tested only. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 1 changed file with 14 additions and 8 deletions Side-by-side Diff
drivers/net/ns83820.c
... | ... | @@ -1948,7 +1948,19 @@ |
1948 | 1948 | } |
1949 | 1949 | #endif |
1950 | 1950 | |
1951 | -static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_device_id *id) | |
1951 | +static 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 | + | |
1962 | +static int __devinit ns83820_init_one(struct pci_dev *pci_dev, | |
1963 | + const struct pci_device_id *id) | |
1952 | 1964 | { |
1953 | 1965 | struct net_device *ndev; |
1954 | 1966 | struct ns83820 *dev; |
1955 | 1967 | |
... | ... | @@ -2040,14 +2052,8 @@ |
2040 | 2052 | ndev->name, le32_to_cpu(readl(dev->base + 0x22c)), |
2041 | 2053 | pci_dev->subsystem_vendor, pci_dev->subsystem_device); |
2042 | 2054 | |
2043 | - ndev->open = ns83820_open; | |
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; | |
2055 | + ndev->netdev_ops = &netdev_ops; | |
2049 | 2056 | SET_ETHTOOL_OPS(ndev, &ops); |
2050 | - ndev->tx_timeout = ns83820_tx_timeout; | |
2051 | 2057 | ndev->watchdog_timeo = 5 * HZ; |
2052 | 2058 | pci_set_drvdata(pci_dev, ndev); |
2053 | 2059 |