diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2014-10-02 04:15:30 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-10-03 18:31:40 -0400 |
commit | 6a05880a8b22c6ba2ffdabbceb4635d28abe9072 (patch) | |
tree | ddfe9129a865ed13888fa91603c4326717435beb /drivers/net | |
parent | c2bf5ec20488fb91af32f1c7f7c63f338ebacc9f (diff) |
net: ethernet: Remove superfluous ether_setup after alloc_etherdev
There is no need to call ether_setup after alloc_ethdev since it was
already called there.
Follow commits c706471b2601 ("net: axienet: remove unnecessary
ether_setup after alloc_etherdev") and 3c87dcbfb36c ("net: ll_temac:
Remove unnecessary ether_setup after alloc_etherdev") and fix the
pattern in all remaining ethernet drivers.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/adi/bfin_mac.c | 3 | ||||
-rw-r--r-- | drivers/net/ethernet/allwinner/sun4i-emac.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/altera/altera_tse_main.c | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/cadence/at91_ether.c | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/calxeda/xgmac.c | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/davicom/dm9000.c | 3 | ||||
-rw-r--r-- | drivers/net/ethernet/ethoc.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/lantiq_etop.c | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/moxa/moxart_ether.c | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/netx-eth.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/nuvoton/w90p910_ether.c | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/nxp/lpc_eth.c | 3 | ||||
-rw-r--r-- | drivers/net/ethernet/qualcomm/qca_spi.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/smsc/smc911x.c | 3 | ||||
-rw-r--r-- | drivers/net/ethernet/smsc/smc91x.c | 3 | ||||
-rw-r--r-- | drivers/net/ethernet/smsc/smsc911x.c | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/wiznet/w5100.c | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/wiznet/w5300.c | 1 |
19 files changed, 0 insertions, 34 deletions
diff --git a/drivers/net/ethernet/adi/bfin_mac.c b/drivers/net/ethernet/adi/bfin_mac.c index afa66847e10b..8ed4d3408ef6 100644 --- a/drivers/net/ethernet/adi/bfin_mac.c +++ b/drivers/net/ethernet/adi/bfin_mac.c | |||
@@ -1692,9 +1692,6 @@ static int bfin_mac_probe(struct platform_device *pdev) | |||
1692 | lp->vlan1_mask = ETH_P_8021Q | mii_bus_data->vlan1_mask; | 1692 | lp->vlan1_mask = ETH_P_8021Q | mii_bus_data->vlan1_mask; |
1693 | lp->vlan2_mask = ETH_P_8021Q | mii_bus_data->vlan2_mask; | 1693 | lp->vlan2_mask = ETH_P_8021Q | mii_bus_data->vlan2_mask; |
1694 | 1694 | ||
1695 | /* Fill in the fields of the device structure with ethernet values. */ | ||
1696 | ether_setup(ndev); | ||
1697 | |||
1698 | ndev->netdev_ops = &bfin_mac_netdev_ops; | 1695 | ndev->netdev_ops = &bfin_mac_netdev_ops; |
1699 | ndev->ethtool_ops = &bfin_mac_ethtool_ops; | 1696 | ndev->ethtool_ops = &bfin_mac_ethtool_ops; |
1700 | 1697 | ||
diff --git a/drivers/net/ethernet/allwinner/sun4i-emac.c b/drivers/net/ethernet/allwinner/sun4i-emac.c index 29b9f082475d..1fcd5568a352 100644 --- a/drivers/net/ethernet/allwinner/sun4i-emac.c +++ b/drivers/net/ethernet/allwinner/sun4i-emac.c | |||
@@ -878,8 +878,6 @@ static int emac_probe(struct platform_device *pdev) | |||
878 | emac_powerup(ndev); | 878 | emac_powerup(ndev); |
879 | emac_reset(db); | 879 | emac_reset(db); |
880 | 880 | ||
881 | ether_setup(ndev); | ||
882 | |||
883 | ndev->netdev_ops = &emac_netdev_ops; | 881 | ndev->netdev_ops = &emac_netdev_ops; |
884 | ndev->watchdog_timeo = msecs_to_jiffies(watchdog); | 882 | ndev->watchdog_timeo = msecs_to_jiffies(watchdog); |
885 | ndev->ethtool_ops = &emac_ethtool_ops; | 883 | ndev->ethtool_ops = &emac_ethtool_ops; |
diff --git a/drivers/net/ethernet/altera/altera_tse_main.c b/drivers/net/ethernet/altera/altera_tse_main.c index 7330681574d2..fc2d5556b715 100644 --- a/drivers/net/ethernet/altera/altera_tse_main.c +++ b/drivers/net/ethernet/altera/altera_tse_main.c | |||
@@ -1433,7 +1433,6 @@ static int altera_tse_probe(struct platform_device *pdev) | |||
1433 | goto err_free_netdev; | 1433 | goto err_free_netdev; |
1434 | 1434 | ||
1435 | /* initialize netdev */ | 1435 | /* initialize netdev */ |
1436 | ether_setup(ndev); | ||
1437 | ndev->mem_start = control_port->start; | 1436 | ndev->mem_start = control_port->start; |
1438 | ndev->mem_end = control_port->end; | 1437 | ndev->mem_end = control_port->end; |
1439 | ndev->netdev_ops = &altera_tse_netdev_ops; | 1438 | ndev->netdev_ops = &altera_tse_netdev_ops; |
diff --git a/drivers/net/ethernet/cadence/at91_ether.c b/drivers/net/ethernet/cadence/at91_ether.c index 4a79edaf3885..4a24b9a6ad75 100644 --- a/drivers/net/ethernet/cadence/at91_ether.c +++ b/drivers/net/ethernet/cadence/at91_ether.c | |||
@@ -351,7 +351,6 @@ static int __init at91ether_probe(struct platform_device *pdev) | |||
351 | if (res) | 351 | if (res) |
352 | goto err_disable_clock; | 352 | goto err_disable_clock; |
353 | 353 | ||
354 | ether_setup(dev); | ||
355 | dev->netdev_ops = &at91ether_netdev_ops; | 354 | dev->netdev_ops = &at91ether_netdev_ops; |
356 | dev->ethtool_ops = &macb_ethtool_ops; | 355 | dev->ethtool_ops = &macb_ethtool_ops; |
357 | platform_set_drvdata(pdev, dev); | 356 | platform_set_drvdata(pdev, dev); |
diff --git a/drivers/net/ethernet/calxeda/xgmac.c b/drivers/net/ethernet/calxeda/xgmac.c index 25d6b2a10e4e..47bfea24b9e1 100644 --- a/drivers/net/ethernet/calxeda/xgmac.c +++ b/drivers/net/ethernet/calxeda/xgmac.c | |||
@@ -1735,7 +1735,6 @@ static int xgmac_probe(struct platform_device *pdev) | |||
1735 | SET_NETDEV_DEV(ndev, &pdev->dev); | 1735 | SET_NETDEV_DEV(ndev, &pdev->dev); |
1736 | priv = netdev_priv(ndev); | 1736 | priv = netdev_priv(ndev); |
1737 | platform_set_drvdata(pdev, ndev); | 1737 | platform_set_drvdata(pdev, ndev); |
1738 | ether_setup(ndev); | ||
1739 | ndev->netdev_ops = &xgmac_netdev_ops; | 1738 | ndev->netdev_ops = &xgmac_netdev_ops; |
1740 | ndev->ethtool_ops = &xgmac_ethtool_ops; | 1739 | ndev->ethtool_ops = &xgmac_ethtool_ops; |
1741 | spin_lock_init(&priv->stats_lock); | 1740 | spin_lock_init(&priv->stats_lock); |
diff --git a/drivers/net/ethernet/davicom/dm9000.c b/drivers/net/ethernet/davicom/dm9000.c index 70089c29d307..f3ba840cbf7b 100644 --- a/drivers/net/ethernet/davicom/dm9000.c +++ b/drivers/net/ethernet/davicom/dm9000.c | |||
@@ -1613,9 +1613,6 @@ dm9000_probe(struct platform_device *pdev) | |||
1613 | 1613 | ||
1614 | /* from this point we assume that we have found a DM9000 */ | 1614 | /* from this point we assume that we have found a DM9000 */ |
1615 | 1615 | ||
1616 | /* driver system function */ | ||
1617 | ether_setup(ndev); | ||
1618 | |||
1619 | ndev->netdev_ops = &dm9000_netdev_ops; | 1616 | ndev->netdev_ops = &dm9000_netdev_ops; |
1620 | ndev->watchdog_timeo = msecs_to_jiffies(watchdog); | 1617 | ndev->watchdog_timeo = msecs_to_jiffies(watchdog); |
1621 | ndev->ethtool_ops = &dm9000_ethtool_ops; | 1618 | ndev->ethtool_ops = &dm9000_ethtool_ops; |
diff --git a/drivers/net/ethernet/ethoc.c b/drivers/net/ethernet/ethoc.c index f3658bdb64cc..0bc6c102f3ac 100644 --- a/drivers/net/ethernet/ethoc.c +++ b/drivers/net/ethernet/ethoc.c | |||
@@ -1222,8 +1222,6 @@ static int ethoc_probe(struct platform_device *pdev) | |||
1222 | goto error; | 1222 | goto error; |
1223 | } | 1223 | } |
1224 | 1224 | ||
1225 | ether_setup(netdev); | ||
1226 | |||
1227 | /* setup the net_device structure */ | 1225 | /* setup the net_device structure */ |
1228 | netdev->netdev_ops = ðoc_netdev_ops; | 1226 | netdev->netdev_ops = ðoc_netdev_ops; |
1229 | netdev->watchdog_timeo = ETHOC_TIMEOUT; | 1227 | netdev->watchdog_timeo = ETHOC_TIMEOUT; |
diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c index fd4b6aecf6ee..2dad4d5047ba 100644 --- a/drivers/net/ethernet/lantiq_etop.c +++ b/drivers/net/ethernet/lantiq_etop.c | |||
@@ -633,7 +633,6 @@ ltq_etop_init(struct net_device *dev) | |||
633 | int err; | 633 | int err; |
634 | bool random_mac = false; | 634 | bool random_mac = false; |
635 | 635 | ||
636 | ether_setup(dev); | ||
637 | dev->watchdog_timeo = 10 * HZ; | 636 | dev->watchdog_timeo = 10 * HZ; |
638 | err = ltq_etop_hw_init(dev); | 637 | err = ltq_etop_hw_init(dev); |
639 | if (err) | 638 | if (err) |
diff --git a/drivers/net/ethernet/moxa/moxart_ether.c b/drivers/net/ethernet/moxa/moxart_ether.c index 2f12c88c66ab..bde1b70f473b 100644 --- a/drivers/net/ethernet/moxa/moxart_ether.c +++ b/drivers/net/ethernet/moxa/moxart_ether.c | |||
@@ -511,7 +511,6 @@ static int moxart_mac_probe(struct platform_device *pdev) | |||
511 | goto init_fail; | 511 | goto init_fail; |
512 | } | 512 | } |
513 | 513 | ||
514 | ether_setup(ndev); | ||
515 | ndev->netdev_ops = &moxart_netdev_ops; | 514 | ndev->netdev_ops = &moxart_netdev_ops; |
516 | netif_napi_add(ndev, &priv->napi, moxart_rx_poll, RX_DESC_NUM); | 515 | netif_napi_add(ndev, &priv->napi, moxart_rx_poll, RX_DESC_NUM); |
517 | ndev->priv_flags |= IFF_UNICAST_FLT; | 516 | ndev->priv_flags |= IFF_UNICAST_FLT; |
diff --git a/drivers/net/ethernet/netx-eth.c b/drivers/net/ethernet/netx-eth.c index 31eb911e4763..8176c8a1cc6a 100644 --- a/drivers/net/ethernet/netx-eth.c +++ b/drivers/net/ethernet/netx-eth.c | |||
@@ -315,8 +315,6 @@ static int netx_eth_enable(struct net_device *ndev) | |||
315 | unsigned int mac4321, mac65; | 315 | unsigned int mac4321, mac65; |
316 | int running, i; | 316 | int running, i; |
317 | 317 | ||
318 | ether_setup(ndev); | ||
319 | |||
320 | ndev->netdev_ops = &netx_eth_netdev_ops; | 318 | ndev->netdev_ops = &netx_eth_netdev_ops; |
321 | ndev->watchdog_timeo = msecs_to_jiffies(5000); | 319 | ndev->watchdog_timeo = msecs_to_jiffies(5000); |
322 | 320 | ||
diff --git a/drivers/net/ethernet/nuvoton/w90p910_ether.c b/drivers/net/ethernet/nuvoton/w90p910_ether.c index 79645f74b3a8..379b7fbded78 100644 --- a/drivers/net/ethernet/nuvoton/w90p910_ether.c +++ b/drivers/net/ethernet/nuvoton/w90p910_ether.c | |||
@@ -943,7 +943,6 @@ static int w90p910_ether_setup(struct net_device *dev) | |||
943 | { | 943 | { |
944 | struct w90p910_ether *ether = netdev_priv(dev); | 944 | struct w90p910_ether *ether = netdev_priv(dev); |
945 | 945 | ||
946 | ether_setup(dev); | ||
947 | dev->netdev_ops = &w90p910_ether_netdev_ops; | 946 | dev->netdev_ops = &w90p910_ether_netdev_ops; |
948 | dev->ethtool_ops = &w90p910_ether_ethtool_ops; | 947 | dev->ethtool_ops = &w90p910_ether_ethtool_ops; |
949 | 948 | ||
diff --git a/drivers/net/ethernet/nxp/lpc_eth.c b/drivers/net/ethernet/nxp/lpc_eth.c index a44a03c45014..66fd868152e5 100644 --- a/drivers/net/ethernet/nxp/lpc_eth.c +++ b/drivers/net/ethernet/nxp/lpc_eth.c | |||
@@ -1377,9 +1377,6 @@ static int lpc_eth_drv_probe(struct platform_device *pdev) | |||
1377 | goto err_out_iounmap; | 1377 | goto err_out_iounmap; |
1378 | } | 1378 | } |
1379 | 1379 | ||
1380 | /* Fill in the fields of the device structure with ethernet values. */ | ||
1381 | ether_setup(ndev); | ||
1382 | |||
1383 | /* Setup driver functions */ | 1380 | /* Setup driver functions */ |
1384 | ndev->netdev_ops = &lpc_netdev_ops; | 1381 | ndev->netdev_ops = &lpc_netdev_ops; |
1385 | ndev->ethtool_ops = &lpc_eth_ethtool_ops; | 1382 | ndev->ethtool_ops = &lpc_eth_ethtool_ops; |
diff --git a/drivers/net/ethernet/qualcomm/qca_spi.c b/drivers/net/ethernet/qualcomm/qca_spi.c index 74eb520e2649..2c811f66d5ac 100644 --- a/drivers/net/ethernet/qualcomm/qca_spi.c +++ b/drivers/net/ethernet/qualcomm/qca_spi.c | |||
@@ -810,8 +810,6 @@ qcaspi_netdev_setup(struct net_device *dev) | |||
810 | { | 810 | { |
811 | struct qcaspi *qca = NULL; | 811 | struct qcaspi *qca = NULL; |
812 | 812 | ||
813 | ether_setup(dev); | ||
814 | |||
815 | dev->netdev_ops = &qcaspi_netdev_ops; | 813 | dev->netdev_ops = &qcaspi_netdev_ops; |
816 | qcaspi_set_ethtool_ops(dev); | 814 | qcaspi_set_ethtool_ops(dev); |
817 | dev->watchdog_timeo = QCASPI_TX_TIMEOUT; | 815 | dev->watchdog_timeo = QCASPI_TX_TIMEOUT; |
diff --git a/drivers/net/ethernet/smsc/smc911x.c b/drivers/net/ethernet/smsc/smc911x.c index 9778cba9fc74..e88df9c7f1c0 100644 --- a/drivers/net/ethernet/smsc/smc911x.c +++ b/drivers/net/ethernet/smsc/smc911x.c | |||
@@ -1927,9 +1927,6 @@ static int smc911x_probe(struct net_device *dev) | |||
1927 | } | 1927 | } |
1928 | dev->irq = irq_canonicalize(dev->irq); | 1928 | dev->irq = irq_canonicalize(dev->irq); |
1929 | 1929 | ||
1930 | /* Fill in the fields of the device structure with ethernet values. */ | ||
1931 | ether_setup(dev); | ||
1932 | |||
1933 | dev->netdev_ops = &smc911x_netdev_ops; | 1930 | dev->netdev_ops = &smc911x_netdev_ops; |
1934 | dev->watchdog_timeo = msecs_to_jiffies(watchdog); | 1931 | dev->watchdog_timeo = msecs_to_jiffies(watchdog); |
1935 | dev->ethtool_ops = &smc911x_ethtool_ops; | 1932 | dev->ethtool_ops = &smc911x_ethtool_ops; |
diff --git a/drivers/net/ethernet/smsc/smc91x.c b/drivers/net/ethernet/smsc/smc91x.c index bcaa41af1e62..5e94d00b96b3 100644 --- a/drivers/net/ethernet/smsc/smc91x.c +++ b/drivers/net/ethernet/smsc/smc91x.c | |||
@@ -1967,9 +1967,6 @@ static int smc_probe(struct net_device *dev, void __iomem *ioaddr, | |||
1967 | } | 1967 | } |
1968 | dev->irq = irq_canonicalize(dev->irq); | 1968 | dev->irq = irq_canonicalize(dev->irq); |
1969 | 1969 | ||
1970 | /* Fill in the fields of the device structure with ethernet values. */ | ||
1971 | ether_setup(dev); | ||
1972 | |||
1973 | dev->watchdog_timeo = msecs_to_jiffies(watchdog); | 1970 | dev->watchdog_timeo = msecs_to_jiffies(watchdog); |
1974 | dev->netdev_ops = &smc_netdev_ops; | 1971 | dev->netdev_ops = &smc_netdev_ops; |
1975 | dev->ethtool_ops = &smc_ethtool_ops; | 1972 | dev->ethtool_ops = &smc_ethtool_ops; |
diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c index 5e13fa5524ae..affb29da353e 100644 --- a/drivers/net/ethernet/smsc/smsc911x.c +++ b/drivers/net/ethernet/smsc/smsc911x.c | |||
@@ -2255,7 +2255,6 @@ static int smsc911x_init(struct net_device *dev) | |||
2255 | if (smsc911x_soft_reset(pdata)) | 2255 | if (smsc911x_soft_reset(pdata)) |
2256 | return -ENODEV; | 2256 | return -ENODEV; |
2257 | 2257 | ||
2258 | ether_setup(dev); | ||
2259 | dev->flags |= IFF_MULTICAST; | 2258 | dev->flags |= IFF_MULTICAST; |
2260 | netif_napi_add(dev, &pdata->napi, smsc911x_poll, SMSC_NAPI_WEIGHT); | 2259 | netif_napi_add(dev, &pdata->napi, smsc911x_poll, SMSC_NAPI_WEIGHT); |
2261 | dev->netdev_ops = &smsc911x_netdev_ops; | 2260 | dev->netdev_ops = &smsc911x_netdev_ops; |
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 9979f67de3aa..6f77a46c7e2c 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | |||
@@ -2765,8 +2765,6 @@ struct stmmac_priv *stmmac_dvr_probe(struct device *device, | |||
2765 | priv->device = device; | 2765 | priv->device = device; |
2766 | priv->dev = ndev; | 2766 | priv->dev = ndev; |
2767 | 2767 | ||
2768 | ether_setup(ndev); | ||
2769 | |||
2770 | stmmac_set_ethtool_ops(ndev); | 2768 | stmmac_set_ethtool_ops(ndev); |
2771 | priv->pause = pause; | 2769 | priv->pause = pause; |
2772 | priv->plat = plat_dat; | 2770 | priv->plat = plat_dat; |
diff --git a/drivers/net/ethernet/wiznet/w5100.c b/drivers/net/ethernet/wiznet/w5100.c index 104d46f37969..0f56b1c0e082 100644 --- a/drivers/net/ethernet/wiznet/w5100.c +++ b/drivers/net/ethernet/wiznet/w5100.c | |||
@@ -708,7 +708,6 @@ static int w5100_probe(struct platform_device *pdev) | |||
708 | priv = netdev_priv(ndev); | 708 | priv = netdev_priv(ndev); |
709 | priv->ndev = ndev; | 709 | priv->ndev = ndev; |
710 | 710 | ||
711 | ether_setup(ndev); | ||
712 | ndev->netdev_ops = &w5100_netdev_ops; | 711 | ndev->netdev_ops = &w5100_netdev_ops; |
713 | ndev->ethtool_ops = &w5100_ethtool_ops; | 712 | ndev->ethtool_ops = &w5100_ethtool_ops; |
714 | ndev->watchdog_timeo = HZ; | 713 | ndev->watchdog_timeo = HZ; |
diff --git a/drivers/net/ethernet/wiznet/w5300.c b/drivers/net/ethernet/wiznet/w5300.c index 1f33c4c86c20..f961f14a0473 100644 --- a/drivers/net/ethernet/wiznet/w5300.c +++ b/drivers/net/ethernet/wiznet/w5300.c | |||
@@ -620,7 +620,6 @@ static int w5300_probe(struct platform_device *pdev) | |||
620 | priv = netdev_priv(ndev); | 620 | priv = netdev_priv(ndev); |
621 | priv->ndev = ndev; | 621 | priv->ndev = ndev; |
622 | 622 | ||
623 | ether_setup(ndev); | ||
624 | ndev->netdev_ops = &w5300_netdev_ops; | 623 | ndev->netdev_ops = &w5300_netdev_ops; |
625 | ndev->ethtool_ops = &w5300_ethtool_ops; | 624 | ndev->ethtool_ops = &w5300_ethtool_ops; |
626 | ndev->watchdog_timeo = HZ; | 625 | ndev->watchdog_timeo = HZ; |