Commit be76400c authored by Aaro Koskinen's avatar Aaro Koskinen Committed by Greg Kroah-Hartman

staging: octeon-ethernet: move ndo_stop to common init

All init functions call ndo_stop if it's defined, so move it
to common function.
Signed-off-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 96217ebf
......@@ -314,7 +314,6 @@ int cvm_oct_rgmii_init(struct net_device *dev)
int r;
cvm_oct_common_init(dev);
dev->netdev_ops->ndo_stop(dev);
INIT_WORK(&priv->port_work, cvm_oct_rgmii_immediate_poll);
/*
* Due to GMX errata in CN3XXX series chips, it is necessary
......
......@@ -85,7 +85,6 @@ int cvm_oct_sgmii_open(struct net_device *dev)
int cvm_oct_sgmii_init(struct net_device *dev)
{
cvm_oct_common_init(dev);
dev->netdev_ops->ndo_stop(dev);
/* FIXME: Need autoneg logic */
return 0;
......
......@@ -87,7 +87,6 @@ int cvm_oct_xaui_init(struct net_device *dev)
struct octeon_ethernet *priv = netdev_priv(dev);
cvm_oct_common_init(dev);
dev->netdev_ops->ndo_stop(dev);
if (!octeon_is_simulation() && priv->phydev == NULL)
priv->poll = cvm_oct_xaui_poll;
......
......@@ -488,6 +488,9 @@ int cvm_oct_common_init(struct net_device *dev)
memset(dev->netdev_ops->ndo_get_stats(dev), 0,
sizeof(struct net_device_stats));
if (dev->netdev_ops->ndo_stop)
dev->netdev_ops->ndo_stop(dev);
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment