aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pcmcia/fmvj18x_cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/pcmcia/fmvj18x_cs.c')
-rw-r--r--drivers/net/pcmcia/fmvj18x_cs.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/drivers/net/pcmcia/fmvj18x_cs.c b/drivers/net/pcmcia/fmvj18x_cs.c
index b9dc80b9d04a..6580d78397d1 100644
--- a/drivers/net/pcmcia/fmvj18x_cs.c
+++ b/drivers/net/pcmcia/fmvj18x_cs.c
@@ -110,7 +110,6 @@ typedef enum { MBH10302, MBH10304, TDK, CONTEC, LA501, UNGERMANN,
110*/ 110*/
111typedef struct local_info_t { 111typedef struct local_info_t {
112 struct pcmcia_device *p_dev; 112 struct pcmcia_device *p_dev;
113 dev_node_t node;
114 long open_time; 113 long open_time;
115 uint tx_started:1; 114 uint tx_started:1;
116 uint tx_queue; 115 uint tx_queue;
@@ -254,10 +253,6 @@ static int fmvj18x_probe(struct pcmcia_device *link)
254 link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; 253 link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
255 link->io.IOAddrLines = 5; 254 link->io.IOAddrLines = 5;
256 255
257 /* Interrupt setup */
258 link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
259 link->irq.Handler = fjn_interrupt;
260
261 /* General socket configuration */ 256 /* General socket configuration */
262 link->conf.Attributes = CONF_ENABLE_IRQ; 257 link->conf.Attributes = CONF_ENABLE_IRQ;
263 link->conf.IntType = INT_MEMORY_AND_IO; 258 link->conf.IntType = INT_MEMORY_AND_IO;
@@ -278,8 +273,7 @@ static void fmvj18x_detach(struct pcmcia_device *link)
278 273
279 dev_dbg(&link->dev, "fmvj18x_detach\n"); 274 dev_dbg(&link->dev, "fmvj18x_detach\n");
280 275
281 if (link->dev_node) 276 unregister_netdev(dev);
282 unregister_netdev(dev);
283 277
284 fmvj18x_release(link); 278 fmvj18x_release(link);
285 279
@@ -425,8 +419,6 @@ static int fmvj18x_config(struct pcmcia_device *link)
425 } 419 }
426 420
427 if (link->io.NumPorts2 != 0) { 421 if (link->io.NumPorts2 != 0) {
428 link->irq.Attributes =
429 IRQ_TYPE_DYNAMIC_SHARING;
430 ret = mfc_try_io_port(link); 422 ret = mfc_try_io_port(link);
431 if (ret != 0) goto failed; 423 if (ret != 0) goto failed;
432 } else if (cardtype == UNGERMANN) { 424 } else if (cardtype == UNGERMANN) {
@@ -437,14 +429,14 @@ static int fmvj18x_config(struct pcmcia_device *link)
437 if (ret) 429 if (ret)
438 goto failed; 430 goto failed;
439 } 431 }
440 ret = pcmcia_request_irq(link, &link->irq); 432 ret = pcmcia_request_irq(link, fjn_interrupt);
441 if (ret) 433 if (ret)
442 goto failed; 434 goto failed;
443 ret = pcmcia_request_configuration(link, &link->conf); 435 ret = pcmcia_request_configuration(link, &link->conf);
444 if (ret) 436 if (ret)
445 goto failed; 437 goto failed;
446 438
447 dev->irq = link->irq.AssignedIRQ; 439 dev->irq = link->irq;
448 dev->base_addr = link->io.BasePort1; 440 dev->base_addr = link->io.BasePort1;
449 441
450 if (link->io.BasePort2 != 0) { 442 if (link->io.BasePort2 != 0) {
@@ -529,17 +521,13 @@ static int fmvj18x_config(struct pcmcia_device *link)
529 } 521 }
530 522
531 lp->cardtype = cardtype; 523 lp->cardtype = cardtype;
532 link->dev_node = &lp->node;
533 SET_NETDEV_DEV(dev, &link->dev); 524 SET_NETDEV_DEV(dev, &link->dev);
534 525
535 if (register_netdev(dev) != 0) { 526 if (register_netdev(dev) != 0) {
536 printk(KERN_NOTICE "fmvj18x_cs: register_netdev() failed\n"); 527 printk(KERN_NOTICE "fmvj18x_cs: register_netdev() failed\n");
537 link->dev_node = NULL;
538 goto failed; 528 goto failed;
539 } 529 }
540 530
541 strcpy(lp->node.dev_name, dev->name);
542
543 /* print current configuration */ 531 /* print current configuration */
544 printk(KERN_INFO "%s: %s, sram %s, port %#3lx, irq %d, " 532 printk(KERN_INFO "%s: %s, sram %s, port %#3lx, irq %d, "
545 "hw_addr %pM\n", 533 "hw_addr %pM\n",