diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2009-02-24 10:41:40 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-25 02:17:21 -0500 |
commit | ea8a8642636b905c79aed104a0755b3fa2e65e8e (patch) | |
tree | 74f497076c39a32d7c0121c8c1fb64acf6a40988 /drivers/net | |
parent | ab307a3983a7fa28f260f3123293c7b91d5d629e (diff) |
mv643xx_eth: convert to net_device_ops
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/mv643xx_eth.c | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c index d4d5a5690d89..7d10897dcc85 100644 --- a/drivers/net/mv643xx_eth.c +++ b/drivers/net/mv643xx_eth.c | |||
@@ -2861,6 +2861,21 @@ static void init_pscr(struct mv643xx_eth_private *mp, int speed, int duplex) | |||
2861 | wrlp(mp, PORT_SERIAL_CONTROL, pscr); | 2861 | wrlp(mp, PORT_SERIAL_CONTROL, pscr); |
2862 | } | 2862 | } |
2863 | 2863 | ||
2864 | static const struct net_device_ops mv643xx_eth_netdev_ops = { | ||
2865 | .ndo_open = mv643xx_eth_open, | ||
2866 | .ndo_stop = mv643xx_eth_stop, | ||
2867 | .ndo_start_xmit = mv643xx_eth_xmit, | ||
2868 | .ndo_set_rx_mode = mv643xx_eth_set_rx_mode, | ||
2869 | .ndo_set_mac_address = mv643xx_eth_set_mac_address, | ||
2870 | .ndo_do_ioctl = mv643xx_eth_ioctl, | ||
2871 | .ndo_change_mtu = mv643xx_eth_change_mtu, | ||
2872 | .ndo_tx_timeout = mv643xx_eth_tx_timeout, | ||
2873 | .ndo_get_stats = mv643xx_eth_get_stats, | ||
2874 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
2875 | .ndo_poll_controller = mv643xx_eth_netpoll, | ||
2876 | #endif | ||
2877 | }; | ||
2878 | |||
2864 | static int mv643xx_eth_probe(struct platform_device *pdev) | 2879 | static int mv643xx_eth_probe(struct platform_device *pdev) |
2865 | { | 2880 | { |
2866 | struct mv643xx_eth_platform_data *pd; | 2881 | struct mv643xx_eth_platform_data *pd; |
@@ -2932,18 +2947,8 @@ static int mv643xx_eth_probe(struct platform_device *pdev) | |||
2932 | BUG_ON(!res); | 2947 | BUG_ON(!res); |
2933 | dev->irq = res->start; | 2948 | dev->irq = res->start; |
2934 | 2949 | ||
2935 | dev->get_stats = mv643xx_eth_get_stats; | 2950 | dev->netdev_ops = &mv643xx_eth_netdev_ops; |
2936 | dev->hard_start_xmit = mv643xx_eth_xmit; | 2951 | |
2937 | dev->open = mv643xx_eth_open; | ||
2938 | dev->stop = mv643xx_eth_stop; | ||
2939 | dev->set_rx_mode = mv643xx_eth_set_rx_mode; | ||
2940 | dev->set_mac_address = mv643xx_eth_set_mac_address; | ||
2941 | dev->do_ioctl = mv643xx_eth_ioctl; | ||
2942 | dev->change_mtu = mv643xx_eth_change_mtu; | ||
2943 | dev->tx_timeout = mv643xx_eth_tx_timeout; | ||
2944 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
2945 | dev->poll_controller = mv643xx_eth_netpoll; | ||
2946 | #endif | ||
2947 | dev->watchdog_timeo = 2 * HZ; | 2952 | dev->watchdog_timeo = 2 * HZ; |
2948 | dev->base_addr = 0; | 2953 | dev->base_addr = 0; |
2949 | 2954 | ||