diff options
Diffstat (limited to 'drivers/net/pcmcia/3c574_cs.c')
-rw-r--r-- | drivers/net/pcmcia/3c574_cs.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/net/pcmcia/3c574_cs.c b/drivers/net/pcmcia/3c574_cs.c index 757f87bb1db3..30b7cf70fbe6 100644 --- a/drivers/net/pcmcia/3c574_cs.c +++ b/drivers/net/pcmcia/3c574_cs.c | |||
@@ -93,7 +93,6 @@ earlier 3Com products. | |||
93 | #include <pcmcia/cisreg.h> | 93 | #include <pcmcia/cisreg.h> |
94 | #include <pcmcia/ciscode.h> | 94 | #include <pcmcia/ciscode.h> |
95 | #include <pcmcia/ds.h> | 95 | #include <pcmcia/ds.h> |
96 | #include <pcmcia/mem_op.h> | ||
97 | 96 | ||
98 | #include <asm/uaccess.h> | 97 | #include <asm/uaccess.h> |
99 | #include <asm/io.h> | 98 | #include <asm/io.h> |
@@ -200,7 +199,6 @@ enum Window4 { /* Window 4: Xcvr/media bits. */ | |||
200 | 199 | ||
201 | struct el3_private { | 200 | struct el3_private { |
202 | struct pcmcia_device *p_dev; | 201 | struct pcmcia_device *p_dev; |
203 | dev_node_t node; | ||
204 | u16 advertising, partner; /* NWay media advertisement */ | 202 | u16 advertising, partner; /* NWay media advertisement */ |
205 | unsigned char phys; /* MII device address */ | 203 | unsigned char phys; /* MII device address */ |
206 | unsigned int autoselect:1, default_media:3; /* Read from the EEPROM/Wn3_Config. */ | 204 | unsigned int autoselect:1, default_media:3; /* Read from the EEPROM/Wn3_Config. */ |
@@ -283,8 +281,6 @@ static int tc574_probe(struct pcmcia_device *link) | |||
283 | spin_lock_init(&lp->window_lock); | 281 | spin_lock_init(&lp->window_lock); |
284 | link->io.NumPorts1 = 32; | 282 | link->io.NumPorts1 = 32; |
285 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_16; | 283 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_16; |
286 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
287 | link->irq.Handler = &el3_interrupt; | ||
288 | link->conf.Attributes = CONF_ENABLE_IRQ; | 284 | link->conf.Attributes = CONF_ENABLE_IRQ; |
289 | link->conf.IntType = INT_MEMORY_AND_IO; | 285 | link->conf.IntType = INT_MEMORY_AND_IO; |
290 | link->conf.ConfigIndex = 1; | 286 | link->conf.ConfigIndex = 1; |
@@ -311,8 +307,7 @@ static void tc574_detach(struct pcmcia_device *link) | |||
311 | 307 | ||
312 | dev_dbg(&link->dev, "3c574_detach()\n"); | 308 | dev_dbg(&link->dev, "3c574_detach()\n"); |
313 | 309 | ||
314 | if (link->dev_node) | 310 | unregister_netdev(dev); |
315 | unregister_netdev(dev); | ||
316 | 311 | ||
317 | tc574_release(link); | 312 | tc574_release(link); |
318 | 313 | ||
@@ -353,7 +348,7 @@ static int tc574_config(struct pcmcia_device *link) | |||
353 | if (i != 0) | 348 | if (i != 0) |
354 | goto failed; | 349 | goto failed; |
355 | 350 | ||
356 | ret = pcmcia_request_irq(link, &link->irq); | 351 | ret = pcmcia_request_irq(link, el3_interrupt); |
357 | if (ret) | 352 | if (ret) |
358 | goto failed; | 353 | goto failed; |
359 | 354 | ||
@@ -361,7 +356,7 @@ static int tc574_config(struct pcmcia_device *link) | |||
361 | if (ret) | 356 | if (ret) |
362 | goto failed; | 357 | goto failed; |
363 | 358 | ||
364 | dev->irq = link->irq.AssignedIRQ; | 359 | dev->irq = link->irq; |
365 | dev->base_addr = link->io.BasePort1; | 360 | dev->base_addr = link->io.BasePort1; |
366 | 361 | ||
367 | ioaddr = dev->base_addr; | 362 | ioaddr = dev->base_addr; |
@@ -446,17 +441,13 @@ static int tc574_config(struct pcmcia_device *link) | |||
446 | } | 441 | } |
447 | } | 442 | } |
448 | 443 | ||
449 | link->dev_node = &lp->node; | ||
450 | SET_NETDEV_DEV(dev, &link->dev); | 444 | SET_NETDEV_DEV(dev, &link->dev); |
451 | 445 | ||
452 | if (register_netdev(dev) != 0) { | 446 | if (register_netdev(dev) != 0) { |
453 | printk(KERN_NOTICE "3c574_cs: register_netdev() failed\n"); | 447 | printk(KERN_NOTICE "3c574_cs: register_netdev() failed\n"); |
454 | link->dev_node = NULL; | ||
455 | goto failed; | 448 | goto failed; |
456 | } | 449 | } |
457 | 450 | ||
458 | strcpy(lp->node.dev_name, dev->name); | ||
459 | |||
460 | printk(KERN_INFO "%s: %s at io %#3lx, irq %d, " | 451 | printk(KERN_INFO "%s: %s at io %#3lx, irq %d, " |
461 | "hw_addr %pM.\n", | 452 | "hw_addr %pM.\n", |
462 | dev->name, cardname, dev->base_addr, dev->irq, | 453 | dev->name, cardname, dev->base_addr, dev->irq, |