diff options
author | Magnus Damm <damm@igel.co.jp> | 2009-01-27 00:32:25 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-27 00:32:25 -0500 |
commit | a528079e01aa9cf6cddc852d5ab5cf4908974745 (patch) | |
tree | 249693c22d52f08e8b7e8a66fb22d8eb903ed632 /drivers/net | |
parent | db1d7bf70f42124f73675fca62fe32f3ab1111b4 (diff) |
smc91x: struct net_device_ops
Convert the smc91x driver to use struct net_device_ops.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/smc91x.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c index d1484060395a..fdcbaf8dfa73 100644 --- a/drivers/net/smc91x.c +++ b/drivers/net/smc91x.c | |||
@@ -1768,6 +1768,19 @@ static const struct ethtool_ops smc_ethtool_ops = { | |||
1768 | .set_eeprom = smc_ethtool_seteeprom, | 1768 | .set_eeprom = smc_ethtool_seteeprom, |
1769 | }; | 1769 | }; |
1770 | 1770 | ||
1771 | static const struct net_device_ops smc_netdev_ops = { | ||
1772 | .ndo_open = smc_open, | ||
1773 | .ndo_stop = smc_close, | ||
1774 | .ndo_start_xmit = smc_hard_start_xmit, | ||
1775 | .ndo_tx_timeout = smc_timeout, | ||
1776 | .ndo_set_multicast_list = smc_set_multicast_list, | ||
1777 | .ndo_validate_addr = eth_validate_addr, | ||
1778 | .ndo_set_mac_address = eth_mac_addr, | ||
1779 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
1780 | .ndo_poll_controller = smc_poll_controller, | ||
1781 | #endif | ||
1782 | }; | ||
1783 | |||
1771 | /* | 1784 | /* |
1772 | * smc_findirq | 1785 | * smc_findirq |
1773 | * | 1786 | * |
@@ -1977,16 +1990,9 @@ static int __devinit smc_probe(struct net_device *dev, void __iomem *ioaddr, | |||
1977 | /* Fill in the fields of the device structure with ethernet values. */ | 1990 | /* Fill in the fields of the device structure with ethernet values. */ |
1978 | ether_setup(dev); | 1991 | ether_setup(dev); |
1979 | 1992 | ||
1980 | dev->open = smc_open; | ||
1981 | dev->stop = smc_close; | ||
1982 | dev->hard_start_xmit = smc_hard_start_xmit; | ||
1983 | dev->tx_timeout = smc_timeout; | ||
1984 | dev->watchdog_timeo = msecs_to_jiffies(watchdog); | 1993 | dev->watchdog_timeo = msecs_to_jiffies(watchdog); |
1985 | dev->set_multicast_list = smc_set_multicast_list; | 1994 | dev->netdev_ops = &smc_netdev_ops; |
1986 | dev->ethtool_ops = &smc_ethtool_ops; | 1995 | dev->ethtool_ops = &smc_ethtool_ops; |
1987 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
1988 | dev->poll_controller = smc_poll_controller; | ||
1989 | #endif | ||
1990 | 1996 | ||
1991 | tasklet_init(&lp->tx_task, smc_hardware_send_pkt, (unsigned long)dev); | 1997 | tasklet_init(&lp->tx_task, smc_hardware_send_pkt, (unsigned long)dev); |
1992 | INIT_WORK(&lp->phy_configure, smc_phy_configure); | 1998 | INIT_WORK(&lp->phy_configure, smc_phy_configure); |