diff options
| author | Alexander Beregalov <a.beregalov@gmail.com> | 2009-04-14 14:30:24 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2009-04-15 00:57:03 -0400 |
| commit | 149da651bf340b796576a078574fbb49ed09b7ae (patch) | |
| tree | 49a503d99dc9c350693d5a177449e5b1e29e6901 /drivers | |
| parent | d9a92cee09d2748ec5d4126cf36083a3a8a5449d (diff) | |
bfin_mac: 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')
| -rw-r--r-- | drivers/net/bfin_mac.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c index 9afe8092dfc4..9f971ed6b58d 100644 --- a/drivers/net/bfin_mac.c +++ b/drivers/net/bfin_mac.c | |||
| @@ -979,6 +979,20 @@ static int bfin_mac_open(struct net_device *dev) | |||
| 979 | return 0; | 979 | return 0; |
| 980 | } | 980 | } |
| 981 | 981 | ||
| 982 | static const struct net_device_ops bfin_mac_netdev_ops = { | ||
| 983 | .ndo_open = bfin_mac_open, | ||
| 984 | .ndo_stop = bfin_mac_close, | ||
| 985 | .ndo_start_xmit = bfin_mac_hard_start_xmit, | ||
| 986 | .ndo_set_mac_address = bfin_mac_set_mac_address, | ||
| 987 | .ndo_tx_timeout = bfin_mac_timeout, | ||
| 988 | .ndo_set_multicast_list = bfin_mac_set_multicast_list, | ||
| 989 | .ndo_validate_addr = eth_validate_addr, | ||
| 990 | .ndo_change_mtu = eth_change_mtu, | ||
| 991 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
| 992 | .ndo_poll_controller = bfin_mac_poll, | ||
| 993 | #endif | ||
| 994 | }; | ||
| 995 | |||
| 982 | /* | 996 | /* |
| 983 | * | 997 | * |
| 984 | * this makes the board clean up everything that it can | 998 | * this makes the board clean up everything that it can |
| @@ -1086,15 +1100,7 @@ static int __devinit bfin_mac_probe(struct platform_device *pdev) | |||
| 1086 | /* Fill in the fields of the device structure with ethernet values. */ | 1100 | /* Fill in the fields of the device structure with ethernet values. */ |
| 1087 | ether_setup(ndev); | 1101 | ether_setup(ndev); |
| 1088 | 1102 | ||
| 1089 | ndev->open = bfin_mac_open; | 1103 | ndev->netdev_ops = &bfin_mac_netdev_ops; |
| 1090 | ndev->stop = bfin_mac_close; | ||
| 1091 | ndev->hard_start_xmit = bfin_mac_hard_start_xmit; | ||
| 1092 | ndev->set_mac_address = bfin_mac_set_mac_address; | ||
| 1093 | ndev->tx_timeout = bfin_mac_timeout; | ||
| 1094 | ndev->set_multicast_list = bfin_mac_set_multicast_list; | ||
| 1095 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
| 1096 | ndev->poll_controller = bfin_mac_poll; | ||
| 1097 | #endif | ||
| 1098 | ndev->ethtool_ops = &bfin_mac_ethtool_ops; | 1104 | ndev->ethtool_ops = &bfin_mac_ethtool_ops; |
| 1099 | 1105 | ||
| 1100 | spin_lock_init(&lp->lock); | 1106 | spin_lock_init(&lp->lock); |
