diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2008-12-04 01:09:30 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-04 01:09:30 -0500 |
commit | b6114794a1c394534659f4a17420e48cf23aa922 (patch) | |
tree | 801c91d4a3e34acd2f6ae1a5338c7b3c56b2a6bb /drivers/net/zorro8390.c | |
parent | 3e1d7cd2dc708f2054b2180e05ae283b9f91d543 (diff) |
zorro8390: convert to net_device_ops
Another device using 8390 library that needs converting.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/zorro8390.c')
-rw-r--r-- | drivers/net/zorro8390.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/drivers/net/zorro8390.c b/drivers/net/zorro8390.c index 9c73df4a0d30..affd904deafc 100644 --- a/drivers/net/zorro8390.c +++ b/drivers/net/zorro8390.c | |||
@@ -122,7 +122,7 @@ static int __devinit zorro8390_init_one(struct zorro_dev *z, | |||
122 | break; | 122 | break; |
123 | board = z->resource.start; | 123 | board = z->resource.start; |
124 | ioaddr = board+cards[i].offset; | 124 | ioaddr = board+cards[i].offset; |
125 | dev = ____alloc_ei_netdev(0); | 125 | dev = alloc_ei_netdev(); |
126 | if (!dev) | 126 | if (!dev) |
127 | return -ENOMEM; | 127 | return -ENOMEM; |
128 | if (!request_mem_region(ioaddr, NE_IO_EXTENT*2, DRV_NAME)) { | 128 | if (!request_mem_region(ioaddr, NE_IO_EXTENT*2, DRV_NAME)) { |
@@ -139,6 +139,20 @@ static int __devinit zorro8390_init_one(struct zorro_dev *z, | |||
139 | return 0; | 139 | return 0; |
140 | } | 140 | } |
141 | 141 | ||
142 | static const struct net_device_ops zorro8390_netdev_ops = { | ||
143 | .ndo_open = zorro8390_open, | ||
144 | .ndo_stop = zorro8390_close, | ||
145 | .ndo_start_xmit = ei_start_xmit, | ||
146 | .ndo_tx_timeout = ei_tx_timeout, | ||
147 | .ndo_get_stats = ei_get_stats, | ||
148 | .ndo_set_multicast_list = ei_set_multicast_list, | ||
149 | .ndo_validate_addr = eth_validate_addr, | ||
150 | .ndo_change_mtu = eth_change_mtu, | ||
151 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
152 | .ndo_poll_controller = ei_poll, | ||
153 | #endif | ||
154 | }; | ||
155 | |||
142 | static int __devinit zorro8390_init(struct net_device *dev, | 156 | static int __devinit zorro8390_init(struct net_device *dev, |
143 | unsigned long board, const char *name, | 157 | unsigned long board, const char *name, |
144 | unsigned long ioaddr) | 158 | unsigned long ioaddr) |
@@ -230,12 +244,8 @@ static int __devinit zorro8390_init(struct net_device *dev, | |||
230 | ei_status.block_output = &zorro8390_block_output; | 244 | ei_status.block_output = &zorro8390_block_output; |
231 | ei_status.get_8390_hdr = &zorro8390_get_8390_hdr; | 245 | ei_status.get_8390_hdr = &zorro8390_get_8390_hdr; |
232 | ei_status.reg_offset = zorro8390_offsets; | 246 | ei_status.reg_offset = zorro8390_offsets; |
233 | dev->open = &zorro8390_open; | ||
234 | dev->stop = &zorro8390_close; | ||
235 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
236 | dev->poll_controller = __ei_poll; | ||
237 | #endif | ||
238 | 247 | ||
248 | dev->netdev_ops = &zorro8390_netdev_ops; | ||
239 | __NS8390_init(dev, 0); | 249 | __NS8390_init(dev, 0); |
240 | err = register_netdev(dev); | 250 | err = register_netdev(dev); |
241 | if (err) { | 251 | if (err) { |