mirror of https://gitee.com/openkylin/linux.git
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 commitsc706471b26
("net: axienet: remove unnecessary ether_setup after alloc_etherdev") and3c87dcbfb3
("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>
This commit is contained in:
parent
c2bf5ec204
commit
6a05880a8b
|
@ -1692,9 +1692,6 @@ static int bfin_mac_probe(struct platform_device *pdev)
|
|||
lp->vlan1_mask = ETH_P_8021Q | mii_bus_data->vlan1_mask;
|
||||
lp->vlan2_mask = ETH_P_8021Q | mii_bus_data->vlan2_mask;
|
||||
|
||||
/* Fill in the fields of the device structure with ethernet values. */
|
||||
ether_setup(ndev);
|
||||
|
||||
ndev->netdev_ops = &bfin_mac_netdev_ops;
|
||||
ndev->ethtool_ops = &bfin_mac_ethtool_ops;
|
||||
|
||||
|
|
|
@ -878,8 +878,6 @@ static int emac_probe(struct platform_device *pdev)
|
|||
emac_powerup(ndev);
|
||||
emac_reset(db);
|
||||
|
||||
ether_setup(ndev);
|
||||
|
||||
ndev->netdev_ops = &emac_netdev_ops;
|
||||
ndev->watchdog_timeo = msecs_to_jiffies(watchdog);
|
||||
ndev->ethtool_ops = &emac_ethtool_ops;
|
||||
|
|
|
@ -1433,7 +1433,6 @@ static int altera_tse_probe(struct platform_device *pdev)
|
|||
goto err_free_netdev;
|
||||
|
||||
/* initialize netdev */
|
||||
ether_setup(ndev);
|
||||
ndev->mem_start = control_port->start;
|
||||
ndev->mem_end = control_port->end;
|
||||
ndev->netdev_ops = &altera_tse_netdev_ops;
|
||||
|
|
|
@ -351,7 +351,6 @@ static int __init at91ether_probe(struct platform_device *pdev)
|
|||
if (res)
|
||||
goto err_disable_clock;
|
||||
|
||||
ether_setup(dev);
|
||||
dev->netdev_ops = &at91ether_netdev_ops;
|
||||
dev->ethtool_ops = &macb_ethtool_ops;
|
||||
platform_set_drvdata(pdev, dev);
|
||||
|
|
|
@ -1735,7 +1735,6 @@ static int xgmac_probe(struct platform_device *pdev)
|
|||
SET_NETDEV_DEV(ndev, &pdev->dev);
|
||||
priv = netdev_priv(ndev);
|
||||
platform_set_drvdata(pdev, ndev);
|
||||
ether_setup(ndev);
|
||||
ndev->netdev_ops = &xgmac_netdev_ops;
|
||||
ndev->ethtool_ops = &xgmac_ethtool_ops;
|
||||
spin_lock_init(&priv->stats_lock);
|
||||
|
|
|
@ -1613,9 +1613,6 @@ dm9000_probe(struct platform_device *pdev)
|
|||
|
||||
/* from this point we assume that we have found a DM9000 */
|
||||
|
||||
/* driver system function */
|
||||
ether_setup(ndev);
|
||||
|
||||
ndev->netdev_ops = &dm9000_netdev_ops;
|
||||
ndev->watchdog_timeo = msecs_to_jiffies(watchdog);
|
||||
ndev->ethtool_ops = &dm9000_ethtool_ops;
|
||||
|
|
|
@ -1222,8 +1222,6 @@ static int ethoc_probe(struct platform_device *pdev)
|
|||
goto error;
|
||||
}
|
||||
|
||||
ether_setup(netdev);
|
||||
|
||||
/* setup the net_device structure */
|
||||
netdev->netdev_ops = ðoc_netdev_ops;
|
||||
netdev->watchdog_timeo = ETHOC_TIMEOUT;
|
||||
|
|
|
@ -633,7 +633,6 @@ ltq_etop_init(struct net_device *dev)
|
|||
int err;
|
||||
bool random_mac = false;
|
||||
|
||||
ether_setup(dev);
|
||||
dev->watchdog_timeo = 10 * HZ;
|
||||
err = ltq_etop_hw_init(dev);
|
||||
if (err)
|
||||
|
|
|
@ -511,7 +511,6 @@ static int moxart_mac_probe(struct platform_device *pdev)
|
|||
goto init_fail;
|
||||
}
|
||||
|
||||
ether_setup(ndev);
|
||||
ndev->netdev_ops = &moxart_netdev_ops;
|
||||
netif_napi_add(ndev, &priv->napi, moxart_rx_poll, RX_DESC_NUM);
|
||||
ndev->priv_flags |= IFF_UNICAST_FLT;
|
||||
|
|
|
@ -315,8 +315,6 @@ static int netx_eth_enable(struct net_device *ndev)
|
|||
unsigned int mac4321, mac65;
|
||||
int running, i;
|
||||
|
||||
ether_setup(ndev);
|
||||
|
||||
ndev->netdev_ops = &netx_eth_netdev_ops;
|
||||
ndev->watchdog_timeo = msecs_to_jiffies(5000);
|
||||
|
||||
|
|
|
@ -943,7 +943,6 @@ static int w90p910_ether_setup(struct net_device *dev)
|
|||
{
|
||||
struct w90p910_ether *ether = netdev_priv(dev);
|
||||
|
||||
ether_setup(dev);
|
||||
dev->netdev_ops = &w90p910_ether_netdev_ops;
|
||||
dev->ethtool_ops = &w90p910_ether_ethtool_ops;
|
||||
|
||||
|
|
|
@ -1377,9 +1377,6 @@ static int lpc_eth_drv_probe(struct platform_device *pdev)
|
|||
goto err_out_iounmap;
|
||||
}
|
||||
|
||||
/* Fill in the fields of the device structure with ethernet values. */
|
||||
ether_setup(ndev);
|
||||
|
||||
/* Setup driver functions */
|
||||
ndev->netdev_ops = &lpc_netdev_ops;
|
||||
ndev->ethtool_ops = &lpc_eth_ethtool_ops;
|
||||
|
|
|
@ -810,8 +810,6 @@ qcaspi_netdev_setup(struct net_device *dev)
|
|||
{
|
||||
struct qcaspi *qca = NULL;
|
||||
|
||||
ether_setup(dev);
|
||||
|
||||
dev->netdev_ops = &qcaspi_netdev_ops;
|
||||
qcaspi_set_ethtool_ops(dev);
|
||||
dev->watchdog_timeo = QCASPI_TX_TIMEOUT;
|
||||
|
|
|
@ -1927,9 +1927,6 @@ static int smc911x_probe(struct net_device *dev)
|
|||
}
|
||||
dev->irq = irq_canonicalize(dev->irq);
|
||||
|
||||
/* Fill in the fields of the device structure with ethernet values. */
|
||||
ether_setup(dev);
|
||||
|
||||
dev->netdev_ops = &smc911x_netdev_ops;
|
||||
dev->watchdog_timeo = msecs_to_jiffies(watchdog);
|
||||
dev->ethtool_ops = &smc911x_ethtool_ops;
|
||||
|
|
|
@ -1967,9 +1967,6 @@ static int smc_probe(struct net_device *dev, void __iomem *ioaddr,
|
|||
}
|
||||
dev->irq = irq_canonicalize(dev->irq);
|
||||
|
||||
/* Fill in the fields of the device structure with ethernet values. */
|
||||
ether_setup(dev);
|
||||
|
||||
dev->watchdog_timeo = msecs_to_jiffies(watchdog);
|
||||
dev->netdev_ops = &smc_netdev_ops;
|
||||
dev->ethtool_ops = &smc_ethtool_ops;
|
||||
|
|
|
@ -2255,7 +2255,6 @@ static int smsc911x_init(struct net_device *dev)
|
|||
if (smsc911x_soft_reset(pdata))
|
||||
return -ENODEV;
|
||||
|
||||
ether_setup(dev);
|
||||
dev->flags |= IFF_MULTICAST;
|
||||
netif_napi_add(dev, &pdata->napi, smsc911x_poll, SMSC_NAPI_WEIGHT);
|
||||
dev->netdev_ops = &smsc911x_netdev_ops;
|
||||
|
|
|
@ -2765,8 +2765,6 @@ struct stmmac_priv *stmmac_dvr_probe(struct device *device,
|
|||
priv->device = device;
|
||||
priv->dev = ndev;
|
||||
|
||||
ether_setup(ndev);
|
||||
|
||||
stmmac_set_ethtool_ops(ndev);
|
||||
priv->pause = pause;
|
||||
priv->plat = plat_dat;
|
||||
|
|
|
@ -708,7 +708,6 @@ static int w5100_probe(struct platform_device *pdev)
|
|||
priv = netdev_priv(ndev);
|
||||
priv->ndev = ndev;
|
||||
|
||||
ether_setup(ndev);
|
||||
ndev->netdev_ops = &w5100_netdev_ops;
|
||||
ndev->ethtool_ops = &w5100_ethtool_ops;
|
||||
ndev->watchdog_timeo = HZ;
|
||||
|
|
|
@ -620,7 +620,6 @@ static int w5300_probe(struct platform_device *pdev)
|
|||
priv = netdev_priv(ndev);
|
||||
priv->ndev = ndev;
|
||||
|
||||
ether_setup(ndev);
|
||||
ndev->netdev_ops = &w5300_netdev_ops;
|
||||
ndev->ethtool_ops = &w5300_ethtool_ops;
|
||||
ndev->watchdog_timeo = HZ;
|
||||
|
|
Loading…
Reference in New Issue