diff options
author | Wilfried Klaebe <w-lkml@lebenslange-mailadresse.de> | 2014-05-10 20:12:32 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-05-13 17:43:20 -0400 |
commit | 7ad24ea4bf620a32631d7b3069c3e30c078b0c3e (patch) | |
tree | cdb3585122d2c7b99106edf4cbeebfd86c5aa7bf /drivers/net/ethernet/micrel | |
parent | 0f49ff07025e8d6cd25bce5b623881739e04926e (diff) |
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>
Diffstat (limited to 'drivers/net/ethernet/micrel')
-rw-r--r-- | drivers/net/ethernet/micrel/ks8695net.c | 6 | ||||
-rw-r--r-- | drivers/net/ethernet/micrel/ks8851.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/micrel/ksz884x.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/ethernet/micrel/ks8695net.c b/drivers/net/ethernet/micrel/ks8695net.c index 16435b3cfa9f..6c7c78baedca 100644 --- a/drivers/net/ethernet/micrel/ks8695net.c +++ b/drivers/net/ethernet/micrel/ks8695net.c | |||
@@ -1504,15 +1504,15 @@ ks8695_probe(struct platform_device *pdev) | |||
1504 | if (ksp->phyiface_regs && ksp->link_irq == -1) { | 1504 | if (ksp->phyiface_regs && ksp->link_irq == -1) { |
1505 | ks8695_init_switch(ksp); | 1505 | ks8695_init_switch(ksp); |
1506 | ksp->dtype = KS8695_DTYPE_LAN; | 1506 | ksp->dtype = KS8695_DTYPE_LAN; |
1507 | SET_ETHTOOL_OPS(ndev, &ks8695_ethtool_ops); | 1507 | ndev->ethtool_ops = &ks8695_ethtool_ops; |
1508 | } else if (ksp->phyiface_regs && ksp->link_irq != -1) { | 1508 | } else if (ksp->phyiface_regs && ksp->link_irq != -1) { |
1509 | ks8695_init_wan_phy(ksp); | 1509 | ks8695_init_wan_phy(ksp); |
1510 | ksp->dtype = KS8695_DTYPE_WAN; | 1510 | ksp->dtype = KS8695_DTYPE_WAN; |
1511 | SET_ETHTOOL_OPS(ndev, &ks8695_wan_ethtool_ops); | 1511 | ndev->ethtool_ops = &ks8695_wan_ethtool_ops; |
1512 | } else { | 1512 | } else { |
1513 | /* No initialisation since HPNA does not have a PHY */ | 1513 | /* No initialisation since HPNA does not have a PHY */ |
1514 | ksp->dtype = KS8695_DTYPE_HPNA; | 1514 | ksp->dtype = KS8695_DTYPE_HPNA; |
1515 | SET_ETHTOOL_OPS(ndev, &ks8695_ethtool_ops); | 1515 | ndev->ethtool_ops = &ks8695_ethtool_ops; |
1516 | } | 1516 | } |
1517 | 1517 | ||
1518 | /* And bring up the net_device with the net core */ | 1518 | /* And bring up the net_device with the net core */ |
diff --git a/drivers/net/ethernet/micrel/ks8851.c b/drivers/net/ethernet/micrel/ks8851.c index e0c92e0e5e1d..13767eb36a48 100644 --- a/drivers/net/ethernet/micrel/ks8851.c +++ b/drivers/net/ethernet/micrel/ks8851.c | |||
@@ -1471,7 +1471,7 @@ static int ks8851_probe(struct spi_device *spi) | |||
1471 | 1471 | ||
1472 | skb_queue_head_init(&ks->txq); | 1472 | skb_queue_head_init(&ks->txq); |
1473 | 1473 | ||
1474 | SET_ETHTOOL_OPS(ndev, &ks8851_ethtool_ops); | 1474 | ndev->ethtool_ops = &ks8851_ethtool_ops; |
1475 | SET_NETDEV_DEV(ndev, &spi->dev); | 1475 | SET_NETDEV_DEV(ndev, &spi->dev); |
1476 | 1476 | ||
1477 | spi_set_drvdata(spi, ks); | 1477 | spi_set_drvdata(spi, ks); |
diff --git a/drivers/net/ethernet/micrel/ksz884x.c b/drivers/net/ethernet/micrel/ksz884x.c index 14ac0e2bc09f..4b9592c1fb40 100644 --- a/drivers/net/ethernet/micrel/ksz884x.c +++ b/drivers/net/ethernet/micrel/ksz884x.c | |||
@@ -7106,7 +7106,7 @@ static int pcidev_init(struct pci_dev *pdev, const struct pci_device_id *id) | |||
7106 | } | 7106 | } |
7107 | 7107 | ||
7108 | dev->netdev_ops = &netdev_ops; | 7108 | dev->netdev_ops = &netdev_ops; |
7109 | SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); | 7109 | dev->ethtool_ops = &netdev_ethtool_ops; |
7110 | if (register_netdev(dev)) | 7110 | if (register_netdev(dev)) |
7111 | goto pcidev_init_reg_err; | 7111 | goto pcidev_init_reg_err; |
7112 | port_set_power_saving(port, true); | 7112 | port_set_power_saving(port, true); |