diff options
author | Alexander Beregalov <a.beregalov@gmail.com> | 2009-04-15 08:52:48 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-16 05:20:16 -0400 |
commit | 488b4abcd750c0a600eefa4d9ab42aad980ace11 (patch) | |
tree | fcacb538283ebcaadf93667d1785492a06fdb1cb /drivers/net/mace.c | |
parent | 71f4367ca24830d967fca7a9c1cfb944b08742e5 (diff) |
mace: 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/mace.c')
-rw-r--r-- | drivers/net/mace.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/net/mace.c b/drivers/net/mace.c index feebbd92aff2..1ad740bc8878 100644 --- a/drivers/net/mace.c +++ b/drivers/net/mace.c | |||
@@ -94,6 +94,16 @@ static void __mace_set_address(struct net_device *dev, void *addr); | |||
94 | */ | 94 | */ |
95 | static unsigned char *dummy_buf; | 95 | static unsigned char *dummy_buf; |
96 | 96 | ||
97 | static const struct net_device_ops mace_netdev_ops = { | ||
98 | .ndo_open = mace_open, | ||
99 | .ndo_stop = mace_close, | ||
100 | .ndo_start_xmit = mace_xmit_start, | ||
101 | .ndo_set_multicast_list = mace_set_multicast, | ||
102 | .ndo_set_mac_address = mace_set_address, | ||
103 | .ndo_change_mtu = eth_change_mtu, | ||
104 | .ndo_validate_addr = eth_validate_addr, | ||
105 | }; | ||
106 | |||
97 | static int __devinit mace_probe(struct macio_dev *mdev, const struct of_device_id *match) | 107 | static int __devinit mace_probe(struct macio_dev *mdev, const struct of_device_id *match) |
98 | { | 108 | { |
99 | struct device_node *mace = macio_get_of_node(mdev); | 109 | struct device_node *mace = macio_get_of_node(mdev); |
@@ -207,11 +217,7 @@ static int __devinit mace_probe(struct macio_dev *mdev, const struct of_device_i | |||
207 | } | 217 | } |
208 | } | 218 | } |
209 | 219 | ||
210 | dev->open = mace_open; | 220 | dev->netdev_ops = &mace_netdev_ops; |
211 | dev->stop = mace_close; | ||
212 | dev->hard_start_xmit = mace_xmit_start; | ||
213 | dev->set_multicast_list = mace_set_multicast; | ||
214 | dev->set_mac_address = mace_set_address; | ||
215 | 221 | ||
216 | /* | 222 | /* |
217 | * Most of what is below could be moved to mace_open() | 223 | * Most of what is below could be moved to mace_open() |