diff options
author | Aaro Koskinen <aaro.koskinen@iki.fi> | 2015-04-04 19:51:04 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-04-30 14:59:23 (GMT) |
commit | be76400c31194d759b621bc2b70f0c61882fbaec (patch) | |
tree | 3aff62b4ca062960727054dacb43d4be24cc12d6 | |
parent | 96217ebff7f2fda012f755cdb28f34400fd5f99c (diff) | |
download | linux-be76400c31194d759b621bc2b70f0c61882fbaec.tar.xz |
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: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/octeon/ethernet-rgmii.c | 1 | ||||
-rw-r--r-- | drivers/staging/octeon/ethernet-sgmii.c | 1 | ||||
-rw-r--r-- | drivers/staging/octeon/ethernet-xaui.c | 1 | ||||
-rw-r--r-- | drivers/staging/octeon/ethernet.c | 3 |
4 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/octeon/ethernet-rgmii.c b/drivers/staging/octeon/ethernet-rgmii.c index c428a45..a6b8531 100644 --- a/drivers/staging/octeon/ethernet-rgmii.c +++ b/drivers/staging/octeon/ethernet-rgmii.c @@ -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 diff --git a/drivers/staging/octeon/ethernet-sgmii.c b/drivers/staging/octeon/ethernet-sgmii.c index ece2880..cd791c3 100644 --- a/drivers/staging/octeon/ethernet-sgmii.c +++ b/drivers/staging/octeon/ethernet-sgmii.c @@ -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; diff --git a/drivers/staging/octeon/ethernet-xaui.c b/drivers/staging/octeon/ethernet-xaui.c index e8e51ed..5782c38 100644 --- a/drivers/staging/octeon/ethernet-xaui.c +++ b/drivers/staging/octeon/ethernet-xaui.c @@ -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; diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c index 2a3f9e2..fdd23bf 100644 --- a/drivers/staging/octeon/ethernet.c +++ b/drivers/staging/octeon/ethernet.c @@ -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; } |