aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pcmcia/smc91c92_cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/pcmcia/smc91c92_cs.c')
-rw-r--r--drivers/net/pcmcia/smc91c92_cs.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c
index ccc553782a0..59796e7d09c 100644
--- a/drivers/net/pcmcia/smc91c92_cs.c
+++ b/drivers/net/pcmcia/smc91c92_cs.c
@@ -103,7 +103,6 @@ struct smc_private {
103 u_short manfid; 103 u_short manfid;
104 u_short cardid; 104 u_short cardid;
105 105
106 dev_node_t node;
107 struct sk_buff *saved_skb; 106 struct sk_buff *saved_skb;
108 int packets_waiting; 107 int packets_waiting;
109 void __iomem *base; 108 void __iomem *base;
@@ -323,14 +322,11 @@ static int smc91c92_probe(struct pcmcia_device *link)
323 return -ENOMEM; 322 return -ENOMEM;
324 smc = netdev_priv(dev); 323 smc = netdev_priv(dev);
325 smc->p_dev = link; 324 smc->p_dev = link;
326 link->priv = dev;
327 325
328 spin_lock_init(&smc->lock); 326 spin_lock_init(&smc->lock);
329 link->io.NumPorts1 = 16; 327 link->io.NumPorts1 = 16;
330 link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; 328 link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
331 link->io.IOAddrLines = 4; 329 link->io.IOAddrLines = 4;
332 link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
333 link->irq.Handler = &smc_interrupt;
334 link->conf.Attributes = CONF_ENABLE_IRQ; 330 link->conf.Attributes = CONF_ENABLE_IRQ;
335 link->conf.IntType = INT_MEMORY_AND_IO; 331 link->conf.IntType = INT_MEMORY_AND_IO;
336 332
@@ -363,8 +359,7 @@ static void smc91c92_detach(struct pcmcia_device *link)
363 359
364 dev_dbg(&link->dev, "smc91c92_detach\n"); 360 dev_dbg(&link->dev, "smc91c92_detach\n");
365 361
366 if (link->dev_node) 362 unregister_netdev(dev);
367 unregister_netdev(dev);
368 363
369 smc91c92_release(link); 364 smc91c92_release(link);
370 365
@@ -453,7 +448,6 @@ static int mhz_mfc_config(struct pcmcia_device *link)
453 448
454 link->conf.Attributes |= CONF_ENABLE_SPKR; 449 link->conf.Attributes |= CONF_ENABLE_SPKR;
455 link->conf.Status = CCSR_AUDIO_ENA; 450 link->conf.Status = CCSR_AUDIO_ENA;
456 link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
457 link->io.IOAddrLines = 16; 451 link->io.IOAddrLines = 16;
458 link->io.Attributes2 = IO_DATA_PATH_WIDTH_8; 452 link->io.Attributes2 = IO_DATA_PATH_WIDTH_8;
459 link->io.NumPorts2 = 8; 453 link->io.NumPorts2 = 8;
@@ -652,7 +646,6 @@ static int osi_config(struct pcmcia_device *link)
652 646
653 link->conf.Attributes |= CONF_ENABLE_SPKR; 647 link->conf.Attributes |= CONF_ENABLE_SPKR;
654 link->conf.Status = CCSR_AUDIO_ENA; 648 link->conf.Status = CCSR_AUDIO_ENA;
655 link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
656 link->io.NumPorts1 = 64; 649 link->io.NumPorts1 = 64;
657 link->io.Attributes2 = IO_DATA_PATH_WIDTH_8; 650 link->io.Attributes2 = IO_DATA_PATH_WIDTH_8;
658 link->io.NumPorts2 = 8; 651 link->io.NumPorts2 = 8;
@@ -877,7 +870,7 @@ static int smc91c92_config(struct pcmcia_device *link)
877 if (i) 870 if (i)
878 goto config_failed; 871 goto config_failed;
879 872
880 i = pcmcia_request_irq(link, &link->irq); 873 i = pcmcia_request_irq(link, smc_interrupt);
881 if (i) 874 if (i)
882 goto config_failed; 875 goto config_failed;
883 i = pcmcia_request_configuration(link, &link->conf); 876 i = pcmcia_request_configuration(link, &link->conf);
@@ -887,7 +880,7 @@ static int smc91c92_config(struct pcmcia_device *link)
887 if (smc->manfid == MANFID_MOTOROLA) 880 if (smc->manfid == MANFID_MOTOROLA)
888 mot_config(link); 881 mot_config(link);
889 882
890 dev->irq = link->irq.AssignedIRQ; 883 dev->irq = link->irq;
891 884
892 if ((if_port >= 0) && (if_port <= 2)) 885 if ((if_port >= 0) && (if_port <= 2))
893 dev->if_port = if_port; 886 dev->if_port = if_port;
@@ -960,17 +953,13 @@ static int smc91c92_config(struct pcmcia_device *link)
960 SMC_SELECT_BANK(0); 953 SMC_SELECT_BANK(0);
961 } 954 }
962 955
963 link->dev_node = &smc->node;
964 SET_NETDEV_DEV(dev, &link->dev); 956 SET_NETDEV_DEV(dev, &link->dev);
965 957
966 if (register_netdev(dev) != 0) { 958 if (register_netdev(dev) != 0) {
967 printk(KERN_ERR "smc91c92_cs: register_netdev() failed\n"); 959 printk(KERN_ERR "smc91c92_cs: register_netdev() failed\n");
968 link->dev_node = NULL;
969 goto config_undo; 960 goto config_undo;
970 } 961 }
971 962
972 strcpy(smc->node.dev_name, dev->name);
973
974 printk(KERN_INFO "%s: smc91c%s rev %d: io %#3lx, irq %d, " 963 printk(KERN_INFO "%s: smc91c%s rev %d: io %#3lx, irq %d, "
975 "hw_addr %pM\n", 964 "hw_addr %pM\n",
976 dev->name, name, (rev & 0x0f), dev->base_addr, dev->irq, 965 dev->name, name, (rev & 0x0f), dev->base_addr, dev->irq,