aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/smc911x.c
diff options
context:
space:
mode:
authorAlexander Beregalov <a.beregalov@gmail.com>2009-04-15 08:52:59 -0400
committerDavid S. Miller <davem@davemloft.net>2009-04-16 05:20:25 -0400
commitec4e0cff9b8c97f5d63c8f1bdf7f44fb65fa8e3b (patch)
tree7a31c9d4599444de5f24b86e145701dd8ce76b32 /drivers/net/smc911x.c
parent8c2c6be186097aafd8f8a17927203b457545cc69 (diff)
smc911x: convert to net_device_ops
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/smc911x.c')
-rw-r--r--drivers/net/smc911x.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
index 293610334a77..bc4976ac8712 100644
--- a/drivers/net/smc911x.c
+++ b/drivers/net/smc911x.c
@@ -1774,6 +1774,20 @@ static int __devinit smc911x_findirq(struct net_device *dev)
1774 return probe_irq_off(cookie); 1774 return probe_irq_off(cookie);
1775} 1775}
1776 1776
1777static const struct net_device_ops smc911x_netdev_ops = {
1778 .ndo_open = smc911x_open,
1779 .ndo_stop = smc911x_close,
1780 .ndo_start_xmit = smc911x_hard_start_xmit,
1781 .ndo_tx_timeout = smc911x_timeout,
1782 .ndo_set_multicast_list = smc911x_set_multicast_list,
1783 .ndo_change_mtu = eth_change_mtu,
1784 .ndo_validate_addr = eth_validate_addr,
1785 .ndo_set_mac_address = eth_mac_addr,
1786#ifdef CONFIG_NET_POLL_CONTROLLER
1787 .ndo_poll_controller = smc911x_poll_controller,
1788#endif
1789};
1790
1777/* 1791/*
1778 * Function: smc911x_probe(unsigned long ioaddr) 1792 * Function: smc911x_probe(unsigned long ioaddr)
1779 * 1793 *
@@ -1940,16 +1954,9 @@ static int __devinit smc911x_probe(struct net_device *dev)
1940 /* Fill in the fields of the device structure with ethernet values. */ 1954 /* Fill in the fields of the device structure with ethernet values. */
1941 ether_setup(dev); 1955 ether_setup(dev);
1942 1956
1943 dev->open = smc911x_open; 1957 dev->netdev_ops = &smc911x_netdev_ops;
1944 dev->stop = smc911x_close;
1945 dev->hard_start_xmit = smc911x_hard_start_xmit;
1946 dev->tx_timeout = smc911x_timeout;
1947 dev->watchdog_timeo = msecs_to_jiffies(watchdog); 1958 dev->watchdog_timeo = msecs_to_jiffies(watchdog);
1948 dev->set_multicast_list = smc911x_set_multicast_list;
1949 dev->ethtool_ops = &smc911x_ethtool_ops; 1959 dev->ethtool_ops = &smc911x_ethtool_ops;
1950#ifdef CONFIG_NET_POLL_CONTROLLER
1951 dev->poll_controller = smc911x_poll_controller;
1952#endif
1953 1960
1954 INIT_WORK(&lp->phy_configure, smc911x_phy_configure); 1961 INIT_WORK(&lp->phy_configure, smc911x_phy_configure);
1955 lp->mii.phy_id_mask = 0x1f; 1962 lp->mii.phy_id_mask = 0x1f;