diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2008-11-25 21:23:06 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-25 21:23:06 -0500 |
commit | d079841d795b83822357ef058ce8d7979dad854c (patch) | |
tree | e7cea6422919ac41616ab1353cd324ecb47a9941 | |
parent | d4a97d425c2f59849ebdcc94281ecf108818efbf (diff) |
smc: convert to net_device_ops
Convert both eisa and mca versions of this driver, though I doubt
anyone still has the hardware.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/smc-mca.c | 22 | ||||
-rw-r--r-- | drivers/net/smc-ultra.c | 22 |
2 files changed, 34 insertions, 10 deletions
diff --git a/drivers/net/smc-mca.c b/drivers/net/smc-mca.c index 58a0e0a4a325..ae5f38d9941c 100644 --- a/drivers/net/smc-mca.c +++ b/drivers/net/smc-mca.c | |||
@@ -182,6 +182,22 @@ static char *smc_mca_adapter_names[] __initdata = { | |||
182 | 182 | ||
183 | static int ultra_found = 0; | 183 | static int ultra_found = 0; |
184 | 184 | ||
185 | |||
186 | static const struct net_device_ops ultra_netdev_ops = { | ||
187 | .ndo_open = ultramca_open, | ||
188 | .ndo_stop = ultramca_close_card, | ||
189 | |||
190 | .ndo_start_xmit = ei_start_xmit, | ||
191 | .ndo_tx_timeout = ei_tx_timeout, | ||
192 | .ndo_get_stats = ei_get_stats, | ||
193 | .ndo_set_multicast_list = ei_set_multicast_list, | ||
194 | .ndo_validate_addr = eth_validate_addr, | ||
195 | .ndo_change_mtu = eth_change_mtu, | ||
196 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
197 | .ndo_poll_controller = ei_poll, | ||
198 | #endif | ||
199 | }; | ||
200 | |||
185 | static int __init ultramca_probe(struct device *gen_dev) | 201 | static int __init ultramca_probe(struct device *gen_dev) |
186 | { | 202 | { |
187 | unsigned short ioaddr; | 203 | unsigned short ioaddr; |
@@ -384,11 +400,7 @@ static int __init ultramca_probe(struct device *gen_dev) | |||
384 | 400 | ||
385 | ei_status.priv = slot; | 401 | ei_status.priv = slot; |
386 | 402 | ||
387 | dev->open = &ultramca_open; | 403 | dev->netdev_ops = &ultramca_netdev_ops; |
388 | dev->stop = &ultramca_close_card; | ||
389 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
390 | dev->poll_controller = ei_poll; | ||
391 | #endif | ||
392 | 404 | ||
393 | NS8390_init(dev, 0); | 405 | NS8390_init(dev, 0); |
394 | 406 | ||
diff --git a/drivers/net/smc-ultra.c b/drivers/net/smc-ultra.c index 0fe0251767bb..b3866089a206 100644 --- a/drivers/net/smc-ultra.c +++ b/drivers/net/smc-ultra.c | |||
@@ -187,6 +187,21 @@ out: | |||
187 | } | 187 | } |
188 | #endif | 188 | #endif |
189 | 189 | ||
190 | static const struct net_device_ops ultra_netdev_ops = { | ||
191 | .ndo_open = ultra_open, | ||
192 | .ndo_stop = ultra_close_card, | ||
193 | |||
194 | .ndo_start_xmit = ei_start_xmit, | ||
195 | .ndo_tx_timeout = ei_tx_timeout, | ||
196 | .ndo_get_stats = ei_get_stats, | ||
197 | .ndo_set_multicast_list = ei_set_multicast_list, | ||
198 | .ndo_validate_addr = eth_validate_addr, | ||
199 | .ndo_change_mtu = eth_change_mtu, | ||
200 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
201 | .ndo_poll_controller = ei_poll, | ||
202 | #endif | ||
203 | }; | ||
204 | |||
190 | static int __init ultra_probe1(struct net_device *dev, int ioaddr) | 205 | static int __init ultra_probe1(struct net_device *dev, int ioaddr) |
191 | { | 206 | { |
192 | int i, retval; | 207 | int i, retval; |
@@ -300,11 +315,8 @@ static int __init ultra_probe1(struct net_device *dev, int ioaddr) | |||
300 | ei_status.get_8390_hdr = &ultra_get_8390_hdr; | 315 | ei_status.get_8390_hdr = &ultra_get_8390_hdr; |
301 | } | 316 | } |
302 | ei_status.reset_8390 = &ultra_reset_8390; | 317 | ei_status.reset_8390 = &ultra_reset_8390; |
303 | dev->open = &ultra_open; | 318 | |
304 | dev->stop = &ultra_close_card; | 319 | dev->netdev_ops = &ultra_netdev_ops; |
305 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
306 | dev->poll_controller = ei_poll; | ||
307 | #endif | ||
308 | NS8390_init(dev, 0); | 320 | NS8390_init(dev, 0); |
309 | 321 | ||
310 | retval = register_netdev(dev); | 322 | retval = register_netdev(dev); |