aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2008-12-04 01:09:30 -0500
committerDavid S. Miller <davem@davemloft.net>2008-12-04 01:09:30 -0500
commitb6114794a1c394534659f4a17420e48cf23aa922 (patch)
tree801c91d4a3e34acd2f6ae1a5338c7b3c56b2a6bb
parent3e1d7cd2dc708f2054b2180e05ae283b9f91d543 (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>
-rw-r--r--drivers/net/Makefile2
-rw-r--r--drivers/net/zorro8390.c22
2 files changed, 17 insertions, 7 deletions
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index f664e8ddfd40..a1fc8a1b50da 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -190,7 +190,7 @@ obj-$(CONFIG_SC92031) += sc92031.o
190obj-$(CONFIG_LP486E) += lp486e.o 190obj-$(CONFIG_LP486E) += lp486e.o
191 191
192obj-$(CONFIG_ETH16I) += eth16i.o 192obj-$(CONFIG_ETH16I) += eth16i.o
193obj-$(CONFIG_ZORRO8390) += zorro8390.o 193obj-$(CONFIG_ZORRO8390) += zorro8390.o 8390.o
194obj-$(CONFIG_HPLANCE) += hplance.o 7990.o 194obj-$(CONFIG_HPLANCE) += hplance.o 7990.o
195obj-$(CONFIG_MVME147_NET) += mvme147.o 7990.o 195obj-$(CONFIG_MVME147_NET) += mvme147.o 7990.o
196obj-$(CONFIG_EQUALIZER) += eql.o 196obj-$(CONFIG_EQUALIZER) += eql.o
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
142static 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
142static int __devinit zorro8390_init(struct net_device *dev, 156static 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) {