diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2008-11-25 21:21:56 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-25 21:21:56 -0500 |
commit | 458228bc4c1370de1dae4ba0f78469092ca21d75 (patch) | |
tree | 28e65c0db3672fff45afdd8efa9d5d0641548788 /drivers/net/wd.c | |
parent | 8884c092e5e4f9a1b6e44f2e02a3eb5481af87ab (diff) |
wd: use net_device_ops
Another driver converted to net_device_ops; Compile tested only.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wd.c')
-rw-r--r-- | drivers/net/wd.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/drivers/net/wd.c b/drivers/net/wd.c index 6d96ed472119..3c1edda08d3d 100644 --- a/drivers/net/wd.c +++ b/drivers/net/wd.c | |||
@@ -147,6 +147,20 @@ out: | |||
147 | } | 147 | } |
148 | #endif | 148 | #endif |
149 | 149 | ||
150 | static const struct net_device_ops wd_netdev_ops = { | ||
151 | .ndo_open = wd_open, | ||
152 | .ndo_stop = wd_close, | ||
153 | .ndo_start_xmit = ei_start_xmit, | ||
154 | .ndo_tx_timeout = ei_tx_timeout, | ||
155 | .ndo_get_stats = ei_get_stats, | ||
156 | .ndo_set_multicast_list = ei_set_multicast_list, | ||
157 | .ndo_validate_addr = eth_validate_addr, | ||
158 | .ndo_change_mtu = eth_change_mtu, | ||
159 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
160 | .ndo_poll_controller = ei_poll, | ||
161 | #endif | ||
162 | }; | ||
163 | |||
150 | static int __init wd_probe1(struct net_device *dev, int ioaddr) | 164 | static int __init wd_probe1(struct net_device *dev, int ioaddr) |
151 | { | 165 | { |
152 | int i; | 166 | int i; |
@@ -331,11 +345,8 @@ static int __init wd_probe1(struct net_device *dev, int ioaddr) | |||
331 | ei_status.block_input = &wd_block_input; | 345 | ei_status.block_input = &wd_block_input; |
332 | ei_status.block_output = &wd_block_output; | 346 | ei_status.block_output = &wd_block_output; |
333 | ei_status.get_8390_hdr = &wd_get_8390_hdr; | 347 | ei_status.get_8390_hdr = &wd_get_8390_hdr; |
334 | dev->open = &wd_open; | 348 | |
335 | dev->stop = &wd_close; | 349 | dev->netdev_ops = &wd_netdev_ops; |
336 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
337 | dev->poll_controller = ei_poll; | ||
338 | #endif | ||
339 | NS8390_init(dev, 0); | 350 | NS8390_init(dev, 0); |
340 | 351 | ||
341 | #if 1 | 352 | #if 1 |
@@ -365,8 +376,7 @@ wd_open(struct net_device *dev) | |||
365 | outb(ei_status.reg5, ioaddr+WD_CMDREG5); | 376 | outb(ei_status.reg5, ioaddr+WD_CMDREG5); |
366 | outb(ei_status.reg0, ioaddr); /* WD_CMDREG */ | 377 | outb(ei_status.reg0, ioaddr); /* WD_CMDREG */ |
367 | 378 | ||
368 | ei_open(dev); | 379 | return ei_open(dev); |
369 | return 0; | ||
370 | } | 380 | } |
371 | 381 | ||
372 | static void | 382 | static void |