mirror of
https://github.com/suyu-emu/horinux.git
synced 2026-09-21 14:15:21 -07:00
net: get rid of SET_ETHTOOL_OPS
net: get rid of SET_ETHTOOL_OPS Dave Miller mentioned he'd like to see SET_ETHTOOL_OPS gone. This does that. Mostly done via coccinelle script: @@ struct ethtool_ops *ops; struct net_device *dev; @@ - SET_ETHTOOL_OPS(dev, ops); + dev->ethtool_ops = ops; Compile tested only, but I'd seriously wonder if this broke anything. Suggested-by: Dave Miller <davem@davemloft.net> Signed-off-by: Wilfried Klaebe <w-lkml@lebenslange-mailadresse.de> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
0f49ff0702
commit
7ad24ea4bf
@@ -105,5 +105,5 @@ static const struct ethtool_ops ipoib_ethtool_ops = {
|
||||
|
||||
void ipoib_set_ethtool_ops(struct net_device *dev)
|
||||
{
|
||||
SET_ETHTOOL_OPS(dev, &ipoib_ethtool_ops);
|
||||
dev->ethtool_ops = &ipoib_ethtool_ops;
|
||||
}
|
||||
|
||||
@@ -534,7 +534,7 @@ static int el3_common_init(struct net_device *dev)
|
||||
/* The EL3-specific entries in the device structure. */
|
||||
dev->netdev_ops = &netdev_ops;
|
||||
dev->watchdog_timeo = TX_TIMEOUT;
|
||||
SET_ETHTOOL_OPS(dev, ðtool_ops);
|
||||
dev->ethtool_ops = ðtool_ops;
|
||||
|
||||
err = register_netdev(dev);
|
||||
if (err) {
|
||||
|
||||
@@ -218,7 +218,7 @@ static int tc589_probe(struct pcmcia_device *link)
|
||||
dev->netdev_ops = &el3_netdev_ops;
|
||||
dev->watchdog_timeo = TX_TIMEOUT;
|
||||
|
||||
SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops);
|
||||
dev->ethtool_ops = &netdev_ethtool_ops;
|
||||
|
||||
return tc589_config(link);
|
||||
}
|
||||
|
||||
@@ -2435,7 +2435,7 @@ typhoon_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
netif_napi_add(dev, &tp->napi, typhoon_poll, 16);
|
||||
dev->watchdog_timeo = TX_TIMEOUT;
|
||||
|
||||
SET_ETHTOOL_OPS(dev, &typhoon_ethtool_ops);
|
||||
dev->ethtool_ops = &typhoon_ethtool_ops;
|
||||
|
||||
/* We can handle scatter gather, up to 16 entries, and
|
||||
* we can do IP checksumming (only version 4, doh...)
|
||||
|
||||
@@ -784,7 +784,7 @@ static int starfire_init_one(struct pci_dev *pdev,
|
||||
|
||||
dev->netdev_ops = &netdev_ops;
|
||||
dev->watchdog_timeo = TX_TIMEOUT;
|
||||
SET_ETHTOOL_OPS(dev, ðtool_ops);
|
||||
dev->ethtool_ops = ðtool_ops;
|
||||
|
||||
netif_napi_add(dev, &np->napi, netdev_poll, max_interrupt_work);
|
||||
|
||||
|
||||
@@ -476,7 +476,7 @@ static int acenic_probe_one(struct pci_dev *pdev,
|
||||
dev->watchdog_timeo = 5*HZ;
|
||||
|
||||
dev->netdev_ops = &ace_netdev_ops;
|
||||
SET_ETHTOOL_OPS(dev, &ace_ethtool_ops);
|
||||
dev->ethtool_ops = &ace_ethtool_ops;
|
||||
|
||||
/* we only display this string ONCE */
|
||||
if (!boards_found)
|
||||
|
||||
@@ -237,5 +237,5 @@ static const struct ethtool_ops tse_ethtool_ops = {
|
||||
|
||||
void altera_tse_set_ethtool_ops(struct net_device *netdev)
|
||||
{
|
||||
SET_ETHTOOL_OPS(netdev, &tse_ethtool_ops);
|
||||
netdev->ethtool_ops = &tse_ethtool_ops;
|
||||
}
|
||||
|
||||
@@ -1900,7 +1900,7 @@ static int amd8111e_probe_one(struct pci_dev *pdev,
|
||||
|
||||
/* Initialize driver entry points */
|
||||
dev->netdev_ops = &amd8111e_netdev_ops;
|
||||
SET_ETHTOOL_OPS(dev, &ops);
|
||||
dev->ethtool_ops = &ops;
|
||||
dev->irq =pdev->irq;
|
||||
dev->watchdog_timeo = AMD8111E_TX_TIMEOUT;
|
||||
netif_napi_add(dev, &lp->napi, amd8111e_rx_poll, 32);
|
||||
|
||||
@@ -1229,7 +1229,7 @@ static int au1000_probe(struct platform_device *pdev)
|
||||
dev->base_addr = base->start;
|
||||
dev->irq = irq;
|
||||
dev->netdev_ops = &au1000_netdev_ops;
|
||||
SET_ETHTOOL_OPS(dev, &au1000_ethtool_ops);
|
||||
dev->ethtool_ops = &au1000_ethtool_ops;
|
||||
dev->watchdog_timeo = ETH_TX_TIMEOUT;
|
||||
|
||||
/*
|
||||
|
||||
@@ -457,7 +457,7 @@ static int nmclan_probe(struct pcmcia_device *link)
|
||||
lp->tx_free_frames=AM2150_MAX_TX_FRAMES;
|
||||
|
||||
dev->netdev_ops = &mace_netdev_ops;
|
||||
SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops);
|
||||
dev->ethtool_ops = &netdev_ethtool_ops;
|
||||
dev->watchdog_timeo = TX_TIMEOUT;
|
||||
|
||||
return nmclan_config(link);
|
||||
|
||||
@@ -1302,7 +1302,7 @@ static int alx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
}
|
||||
|
||||
netdev->netdev_ops = &alx_netdev_ops;
|
||||
SET_ETHTOOL_OPS(netdev, &alx_ethtool_ops);
|
||||
netdev->ethtool_ops = &alx_ethtool_ops;
|
||||
netdev->irq = pdev->irq;
|
||||
netdev->watchdog_timeo = ALX_WATCHDOG_TIME;
|
||||
|
||||
|
||||
@@ -305,5 +305,5 @@ static const struct ethtool_ops atl1c_ethtool_ops = {
|
||||
|
||||
void atl1c_set_ethtool_ops(struct net_device *netdev)
|
||||
{
|
||||
SET_ETHTOOL_OPS(netdev, &atl1c_ethtool_ops);
|
||||
netdev->ethtool_ops = &atl1c_ethtool_ops;
|
||||
}
|
||||
|
||||
@@ -388,5 +388,5 @@ static const struct ethtool_ops atl1e_ethtool_ops = {
|
||||
|
||||
void atl1e_set_ethtool_ops(struct net_device *netdev)
|
||||
{
|
||||
SET_ETHTOOL_OPS(netdev, &atl1e_ethtool_ops);
|
||||
netdev->ethtool_ops = &atl1e_ethtool_ops;
|
||||
}
|
||||
|
||||
@@ -1396,7 +1396,7 @@ static int atl2_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
atl2_setup_pcicmd(pdev);
|
||||
|
||||
netdev->netdev_ops = &atl2_netdev_ops;
|
||||
SET_ETHTOOL_OPS(netdev, &atl2_ethtool_ops);
|
||||
netdev->ethtool_ops = &atl2_ethtool_ops;
|
||||
netdev->watchdog_timeo = 5 * HZ;
|
||||
strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1);
|
||||
|
||||
|
||||
@@ -2380,7 +2380,7 @@ static int b44_init_one(struct ssb_device *sdev,
|
||||
netif_napi_add(dev, &bp->napi, b44_poll, 64);
|
||||
dev->watchdog_timeo = B44_TX_TIMEOUT;
|
||||
dev->irq = sdev->irq;
|
||||
SET_ETHTOOL_OPS(dev, &b44_ethtool_ops);
|
||||
dev->ethtool_ops = &b44_ethtool_ops;
|
||||
|
||||
err = ssb_bus_powerup(sdev->bus, 0);
|
||||
if (err) {
|
||||
|
||||
@@ -1897,7 +1897,7 @@ static int bcm_enet_probe(struct platform_device *pdev)
|
||||
dev->netdev_ops = &bcm_enet_ops;
|
||||
netif_napi_add(dev, &priv->napi, bcm_enet_poll, 16);
|
||||
|
||||
SET_ETHTOOL_OPS(dev, &bcm_enet_ethtool_ops);
|
||||
dev->ethtool_ops = &bcm_enet_ethtool_ops;
|
||||
SET_NETDEV_DEV(dev, &pdev->dev);
|
||||
|
||||
ret = register_netdev(dev);
|
||||
@@ -2783,7 +2783,7 @@ static int bcm_enetsw_probe(struct platform_device *pdev)
|
||||
/* register netdevice */
|
||||
dev->netdev_ops = &bcm_enetsw_ops;
|
||||
netif_napi_add(dev, &priv->napi, bcm_enet_poll, 16);
|
||||
SET_ETHTOOL_OPS(dev, &bcm_enetsw_ethtool_ops);
|
||||
dev->ethtool_ops = &bcm_enetsw_ethtool_ops;
|
||||
SET_NETDEV_DEV(dev, &pdev->dev);
|
||||
|
||||
spin_lock_init(&priv->enetsw_mdio_lock);
|
||||
|
||||
@@ -1540,7 +1540,7 @@ static int bcm_sysport_probe(struct platform_device *pdev)
|
||||
|
||||
SET_NETDEV_DEV(dev, &pdev->dev);
|
||||
dev_set_drvdata(&pdev->dev, dev);
|
||||
SET_ETHTOOL_OPS(dev, &bcm_sysport_ethtool_ops);
|
||||
dev->ethtool_ops = &bcm_sysport_ethtool_ops;
|
||||
dev->netdev_ops = &bcm_sysport_netdev_ops;
|
||||
netif_napi_add(dev, &priv->napi, bcm_sysport_poll, 64);
|
||||
|
||||
|
||||
@@ -1436,7 +1436,7 @@ static int bgmac_probe(struct bcma_device *core)
|
||||
return -ENOMEM;
|
||||
net_dev->netdev_ops = &bgmac_netdev_ops;
|
||||
net_dev->irq = core->irq;
|
||||
SET_ETHTOOL_OPS(net_dev, &bgmac_ethtool_ops);
|
||||
net_dev->ethtool_ops = &bgmac_ethtool_ops;
|
||||
bgmac = netdev_priv(net_dev);
|
||||
bgmac->net_dev = net_dev;
|
||||
bgmac->core = core;
|
||||
|
||||
@@ -3506,8 +3506,6 @@ static const struct ethtool_ops bnx2x_vf_ethtool_ops = {
|
||||
|
||||
void bnx2x_set_ethtool_ops(struct bnx2x *bp, struct net_device *netdev)
|
||||
{
|
||||
if (IS_PF(bp))
|
||||
SET_ETHTOOL_OPS(netdev, &bnx2x_ethtool_ops);
|
||||
else /* vf */
|
||||
SET_ETHTOOL_OPS(netdev, &bnx2x_vf_ethtool_ops);
|
||||
netdev->ethtool_ops = (IS_PF(bp)) ?
|
||||
&bnx2x_ethtool_ops : &bnx2x_vf_ethtool_ops;
|
||||
}
|
||||
|
||||
@@ -2481,7 +2481,7 @@ static int bcmgenet_probe(struct platform_device *pdev)
|
||||
dev_set_drvdata(&pdev->dev, dev);
|
||||
ether_addr_copy(dev->dev_addr, macaddr);
|
||||
dev->watchdog_timeo = 2 * HZ;
|
||||
SET_ETHTOOL_OPS(dev, &bcmgenet_ethtool_ops);
|
||||
dev->ethtool_ops = &bcmgenet_ethtool_ops;
|
||||
dev->netdev_ops = &bcmgenet_netdev_ops;
|
||||
netif_napi_add(dev, &priv->napi, bcmgenet_poll, 64);
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user