aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/octeon/ethernet-sgmii.c
diff options
context:
space:
mode:
authorDavid Daney <ddaney@caviumnetworks.com>2009-06-23 11:34:08 -0700
committerRalf Baechle <ralf@linux-mips.org>2009-06-24 18:34:41 +0100
commitf696a10838ffab85e5bc07e7cff0d0e1870a30d7 (patch)
treecacbd78fdf71fd77b6f8ff5067a7d0e4306824be /drivers/staging/octeon/ethernet-sgmii.c
parentMIPS: Cavium: Add CPU hotplugging code. (diff)
downloadlinux-dev-f696a10838ffab85e5bc07e7cff0d0e1870a30d7.tar.xz
linux-dev-f696a10838ffab85e5bc07e7cff0d0e1870a30d7.zip
Staging: octeon-ethernet: Convert to use net_device_ops.
Convert the driver to use net_device_ops as it is now mandatory. Also compensate for the removal of struct sk_buff's dst field. The changes are mostly mechanical, the content of ethernet-common.c was moved to ethernet.c and ethernet-common.{c,h} are removed. Signed-off-by: David Daney <ddaney@caviumnetworks.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'drivers/staging/octeon/ethernet-sgmii.c')
-rw-r--r--drivers/staging/octeon/ethernet-sgmii.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/staging/octeon/ethernet-sgmii.c b/drivers/staging/octeon/ethernet-sgmii.c
index 58fa39c1d675..2b54996bd85d 100644
--- a/drivers/staging/octeon/ethernet-sgmii.c
+++ b/drivers/staging/octeon/ethernet-sgmii.c
@@ -34,13 +34,12 @@
#include "ethernet-defines.h"
#include "octeon-ethernet.h"
#include "ethernet-util.h"
-#include "ethernet-common.h"
#include "cvmx-helper.h"
#include "cvmx-gmxx-defs.h"
-static int cvm_oct_sgmii_open(struct net_device *dev)
+int cvm_oct_sgmii_open(struct net_device *dev)
{
union cvmx_gmxx_prtx_cfg gmx_cfg;
struct octeon_ethernet *priv = netdev_priv(dev);
@@ -61,7 +60,7 @@ static int cvm_oct_sgmii_open(struct net_device *dev)
return 0;
}
-static int cvm_oct_sgmii_stop(struct net_device *dev)
+int cvm_oct_sgmii_stop(struct net_device *dev)
{
union cvmx_gmxx_prtx_cfg gmx_cfg;
struct octeon_ethernet *priv = netdev_priv(dev);
@@ -113,9 +112,7 @@ int cvm_oct_sgmii_init(struct net_device *dev)
{
struct octeon_ethernet *priv = netdev_priv(dev);
cvm_oct_common_init(dev);
- dev->open = cvm_oct_sgmii_open;
- dev->stop = cvm_oct_sgmii_stop;
- dev->stop(dev);
+ dev->netdev_ops->ndo_stop(dev);
if (!octeon_is_simulation())
priv->poll = cvm_oct_sgmii_poll;