aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sc92031.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2008-11-21 20:37:24 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-21 20:37:24 -0500
commit974acda0ea3261436ddf5fd7e79b56150acdb138 (patch)
tree403bde7b2f273a95932d0bd3bdd0cb320f6dca20 /drivers/net/sc92031.c
parentda1c14a19b978a95180ea91ab0008b97a5843995 (diff)
sc92031: convert to net_device_ops
Convert this driver to net_device_ops. Compile tested only. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sc92031.c')
-rw-r--r--drivers/net/sc92031.c29
1 files changed, 18 insertions, 11 deletions
diff --git a/drivers/net/sc92031.c b/drivers/net/sc92031.c
index 590f2175e9e0..42fd31276602 100644
--- a/drivers/net/sc92031.c
+++ b/drivers/net/sc92031.c
@@ -1386,7 +1386,7 @@ static void sc92031_ethtool_get_ethtool_stats(struct net_device *dev,
1386 spin_unlock_bh(&priv->lock); 1386 spin_unlock_bh(&priv->lock);
1387} 1387}
1388 1388
1389static struct ethtool_ops sc92031_ethtool_ops = { 1389static const struct ethtool_ops sc92031_ethtool_ops = {
1390 .get_settings = sc92031_ethtool_get_settings, 1390 .get_settings = sc92031_ethtool_get_settings,
1391 .set_settings = sc92031_ethtool_set_settings, 1391 .set_settings = sc92031_ethtool_set_settings,
1392 .get_drvinfo = sc92031_ethtool_get_drvinfo, 1392 .get_drvinfo = sc92031_ethtool_get_drvinfo,
@@ -1399,6 +1399,21 @@ static struct ethtool_ops sc92031_ethtool_ops = {
1399 .get_ethtool_stats = sc92031_ethtool_get_ethtool_stats, 1399 .get_ethtool_stats = sc92031_ethtool_get_ethtool_stats,
1400}; 1400};
1401 1401
1402
1403static const struct net_device_ops sc92031_netdev_ops = {
1404 .ndo_get_stats = sc92031_get_stats,
1405 .ndo_start_xmit = sc92031_start_xmit,
1406 .ndo_open = sc92031_open,
1407 .ndo_stop = sc92031_stop,
1408 .ndo_set_multicast_list = sc92031_set_multicast_list,
1409 .ndo_change_mtu = eth_change_mtu,
1410 .ndo_validate_addr = eth_validate_addr,
1411 .ndo_tx_timeout = sc92031_tx_timeout,
1412#ifdef CONFIG_NET_POLL_CONTROLLER
1413 .ndo_poll_controller = sc92031_poll_controller,
1414#endif
1415};
1416
1402static int __devinit sc92031_probe(struct pci_dev *pdev, 1417static int __devinit sc92031_probe(struct pci_dev *pdev,
1403 const struct pci_device_id *id) 1418 const struct pci_device_id *id)
1404{ 1419{
@@ -1452,17 +1467,9 @@ static int __devinit sc92031_probe(struct pci_dev *pdev,
1452 /* faked with skb_copy_and_csum_dev */ 1467 /* faked with skb_copy_and_csum_dev */
1453 dev->features = NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_HIGHDMA; 1468 dev->features = NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_HIGHDMA;
1454 1469
1455 dev->get_stats = sc92031_get_stats; 1470 dev->netdev_ops = &sc92031_netdev_ops;
1456 dev->ethtool_ops = &sc92031_ethtool_ops;
1457 dev->hard_start_xmit = sc92031_start_xmit;
1458 dev->watchdog_timeo = TX_TIMEOUT; 1471 dev->watchdog_timeo = TX_TIMEOUT;
1459 dev->open = sc92031_open; 1472 dev->ethtool_ops = &sc92031_ethtool_ops;
1460 dev->stop = sc92031_stop;
1461 dev->set_multicast_list = sc92031_set_multicast_list;
1462 dev->tx_timeout = sc92031_tx_timeout;
1463#ifdef CONFIG_NET_POLL_CONTROLLER
1464 dev->poll_controller = sc92031_poll_controller;
1465#endif
1466 1473
1467 priv = netdev_priv(dev); 1474 priv = netdev_priv(dev);
1468 spin_lock_init(&priv->lock); 1475 spin_lock_init(&priv->lock);