aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/pcmcia/3c574_cs.c8
-rw-r--r--drivers/net/pcmcia/3c589_cs.c9
-rw-r--r--drivers/net/pcmcia/axnet_cs.c8
-rw-r--r--drivers/net/pcmcia/com20020_cs.c21
-rw-r--r--drivers/net/pcmcia/fmvj18x_cs.c8
-rw-r--r--drivers/net/pcmcia/ibmtr_cs.c8
-rw-r--r--drivers/net/pcmcia/nmclan_cs.c8
-rw-r--r--drivers/net/pcmcia/pcnet_cs.c8
-rw-r--r--drivers/net/pcmcia/smc91c92_cs.c9
-rw-r--r--drivers/net/pcmcia/xirc2ps_cs.c29
-rw-r--r--drivers/net/wireless/orinoco/orinoco_cs.c14
-rw-r--r--drivers/net/wireless/orinoco/spectrum_cs.c14
-rw-r--r--drivers/net/wireless/ray_cs.c6
-rw-r--r--drivers/net/wireless/ray_cs.h1
-rw-r--r--drivers/net/wireless/wl3501.h1
-rw-r--r--drivers/net/wireless/wl3501_cs.c15
16 files changed, 22 insertions, 145 deletions
diff --git a/drivers/net/pcmcia/3c574_cs.c b/drivers/net/pcmcia/3c574_cs.c
index 14428317c009..774e41c7def0 100644
--- a/drivers/net/pcmcia/3c574_cs.c
+++ b/drivers/net/pcmcia/3c574_cs.c
@@ -200,7 +200,6 @@ enum Window4 { /* Window 4: Xcvr/media bits. */
200 200
201struct el3_private { 201struct el3_private {
202 struct pcmcia_device *p_dev; 202 struct pcmcia_device *p_dev;
203 dev_node_t node;
204 u16 advertising, partner; /* NWay media advertisement */ 203 u16 advertising, partner; /* NWay media advertisement */
205 unsigned char phys; /* MII device address */ 204 unsigned char phys; /* MII device address */
206 unsigned int autoselect:1, default_media:3; /* Read from the EEPROM/Wn3_Config. */ 205 unsigned int autoselect:1, default_media:3; /* Read from the EEPROM/Wn3_Config. */
@@ -309,8 +308,7 @@ static void tc574_detach(struct pcmcia_device *link)
309 308
310 dev_dbg(&link->dev, "3c574_detach()\n"); 309 dev_dbg(&link->dev, "3c574_detach()\n");
311 310
312 if (link->dev_node) 311 unregister_netdev(dev);
313 unregister_netdev(dev);
314 312
315 tc574_release(link); 313 tc574_release(link);
316 314
@@ -444,17 +442,13 @@ static int tc574_config(struct pcmcia_device *link)
444 } 442 }
445 } 443 }
446 444
447 link->dev_node = &lp->node;
448 SET_NETDEV_DEV(dev, &link->dev); 445 SET_NETDEV_DEV(dev, &link->dev);
449 446
450 if (register_netdev(dev) != 0) { 447 if (register_netdev(dev) != 0) {
451 printk(KERN_NOTICE "3c574_cs: register_netdev() failed\n"); 448 printk(KERN_NOTICE "3c574_cs: register_netdev() failed\n");
452 link->dev_node = NULL;
453 goto failed; 449 goto failed;
454 } 450 }
455 451
456 strcpy(lp->node.dev_name, dev->name);
457
458 printk(KERN_INFO "%s: %s at io %#3lx, irq %d, " 452 printk(KERN_INFO "%s: %s at io %#3lx, irq %d, "
459 "hw_addr %pM.\n", 453 "hw_addr %pM.\n",
460 dev->name, cardname, dev->base_addr, dev->irq, 454 dev->name, cardname, dev->base_addr, dev->irq,
diff --git a/drivers/net/pcmcia/3c589_cs.c b/drivers/net/pcmcia/3c589_cs.c
index 405d772bfde7..5ab589d3b385 100644
--- a/drivers/net/pcmcia/3c589_cs.c
+++ b/drivers/net/pcmcia/3c589_cs.c
@@ -106,7 +106,6 @@ enum RxFilter {
106 106
107struct el3_private { 107struct el3_private {
108 struct pcmcia_device *p_dev; 108 struct pcmcia_device *p_dev;
109 dev_node_t node;
110 /* For transceiver monitoring */ 109 /* For transceiver monitoring */
111 struct timer_list media; 110 struct timer_list media;
112 u16 media_status; 111 u16 media_status;
@@ -222,8 +221,7 @@ static void tc589_detach(struct pcmcia_device *link)
222 221
223 dev_dbg(&link->dev, "3c589_detach\n"); 222 dev_dbg(&link->dev, "3c589_detach\n");
224 223
225 if (link->dev_node) 224 unregister_netdev(dev);
226 unregister_netdev(dev);
227 225
228 tc589_release(link); 226 tc589_release(link);
229 227
@@ -241,7 +239,6 @@ static void tc589_detach(struct pcmcia_device *link)
241static int tc589_config(struct pcmcia_device *link) 239static int tc589_config(struct pcmcia_device *link)
242{ 240{
243 struct net_device *dev = link->priv; 241 struct net_device *dev = link->priv;
244 struct el3_private *lp = netdev_priv(dev);
245 __be16 *phys_addr; 242 __be16 *phys_addr;
246 int ret, i, j, multi = 0, fifo; 243 int ret, i, j, multi = 0, fifo;
247 unsigned int ioaddr; 244 unsigned int ioaddr;
@@ -312,17 +309,13 @@ static int tc589_config(struct pcmcia_device *link)
312 else 309 else
313 printk(KERN_ERR "3c589_cs: invalid if_port requested\n"); 310 printk(KERN_ERR "3c589_cs: invalid if_port requested\n");
314 311
315 link->dev_node = &lp->node;
316 SET_NETDEV_DEV(dev, &link->dev); 312 SET_NETDEV_DEV(dev, &link->dev);
317 313
318 if (register_netdev(dev) != 0) { 314 if (register_netdev(dev) != 0) {
319 printk(KERN_ERR "3c589_cs: register_netdev() failed\n"); 315 printk(KERN_ERR "3c589_cs: register_netdev() failed\n");
320 link->dev_node = NULL;
321 goto failed; 316 goto failed;
322 } 317 }
323 318
324 strcpy(lp->node.dev_name, dev->name);
325
326 printk(KERN_INFO "%s: 3Com 3c%s, io %#3lx, irq %d, " 319 printk(KERN_INFO "%s: 3Com 3c%s, io %#3lx, irq %d, "
327 "hw_addr %pM\n", 320 "hw_addr %pM\n",
328 dev->name, (multi ? "562" : "589"), dev->base_addr, dev->irq, 321 dev->name, (multi ? "562" : "589"), dev->base_addr, dev->irq,
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c
index 967547a84b4b..59f6fa3c9ddc 100644
--- a/drivers/net/pcmcia/axnet_cs.c
+++ b/drivers/net/pcmcia/axnet_cs.c
@@ -113,7 +113,6 @@ static irqreturn_t ax_interrupt(int irq, void *dev_id);
113 113
114typedef struct axnet_dev_t { 114typedef struct axnet_dev_t {
115 struct pcmcia_device *p_dev; 115 struct pcmcia_device *p_dev;
116 dev_node_t node;
117 caddr_t base; 116 caddr_t base;
118 struct timer_list watchdog; 117 struct timer_list watchdog;
119 int stale, fast_poll; 118 int stale, fast_poll;
@@ -194,8 +193,7 @@ static void axnet_detach(struct pcmcia_device *link)
194 193
195 dev_dbg(&link->dev, "axnet_detach(0x%p)\n", link); 194 dev_dbg(&link->dev, "axnet_detach(0x%p)\n", link);
196 195
197 if (link->dev_node) 196 unregister_netdev(dev);
198 unregister_netdev(dev);
199 197
200 axnet_release(link); 198 axnet_release(link);
201 199
@@ -392,17 +390,13 @@ static int axnet_config(struct pcmcia_device *link)
392 } 390 }
393 391
394 info->phy_id = (i < 32) ? i : -1; 392 info->phy_id = (i < 32) ? i : -1;
395 link->dev_node = &info->node;
396 SET_NETDEV_DEV(dev, &link->dev); 393 SET_NETDEV_DEV(dev, &link->dev);
397 394
398 if (register_netdev(dev) != 0) { 395 if (register_netdev(dev) != 0) {
399 printk(KERN_NOTICE "axnet_cs: register_netdev() failed\n"); 396 printk(KERN_NOTICE "axnet_cs: register_netdev() failed\n");
400 link->dev_node = NULL;
401 goto failed; 397 goto failed;
402 } 398 }
403 399
404 strcpy(info->node.dev_name, dev->name);
405
406 printk(KERN_INFO "%s: Asix AX88%d90: io %#3lx, irq %d, " 400 printk(KERN_INFO "%s: Asix AX88%d90: io %#3lx, irq %d, "
407 "hw_addr %pM\n", 401 "hw_addr %pM\n",
408 dev->name, ((info->flags & IS_AX88790) ? 7 : 1), 402 dev->name, ((info->flags & IS_AX88790) ? 7 : 1),
diff --git a/drivers/net/pcmcia/com20020_cs.c b/drivers/net/pcmcia/com20020_cs.c
index 278438beb915..5643f94541bc 100644
--- a/drivers/net/pcmcia/com20020_cs.c
+++ b/drivers/net/pcmcia/com20020_cs.c
@@ -122,7 +122,6 @@ static void com20020_detach(struct pcmcia_device *p_dev);
122 122
123typedef struct com20020_dev_t { 123typedef struct com20020_dev_t {
124 struct net_device *dev; 124 struct net_device *dev;
125 dev_node_t node;
126} com20020_dev_t; 125} com20020_dev_t;
127 126
128/*====================================================================== 127/*======================================================================
@@ -195,18 +194,16 @@ static void com20020_detach(struct pcmcia_device *link)
195 194
196 dev_dbg(&link->dev, "com20020_detach\n"); 195 dev_dbg(&link->dev, "com20020_detach\n");
197 196
198 if (link->dev_node) { 197 dev_dbg(&link->dev, "unregister...\n");
199 dev_dbg(&link->dev, "unregister...\n");
200 198
201 unregister_netdev(dev); 199 unregister_netdev(dev);
202 200
203 /* 201 /*
204 * this is necessary because we register our IRQ separately 202 * this is necessary because we register our IRQ separately
205 * from card services. 203 * from card services.
206 */ 204 */
207 if (dev->irq) 205 if (dev->irq)
208 free_irq(dev->irq, dev); 206 free_irq(dev->irq, dev);
209 }
210 207
211 com20020_release(link); 208 com20020_release(link);
212 209
@@ -297,7 +294,6 @@ static int com20020_config(struct pcmcia_device *link)
297 lp->card_name = "PCMCIA COM20020"; 294 lp->card_name = "PCMCIA COM20020";
298 lp->card_flags = ARC_CAN_10MBIT; /* pretend all of them can 10Mbit */ 295 lp->card_flags = ARC_CAN_10MBIT; /* pretend all of them can 10Mbit */
299 296
300 link->dev_node = &info->node;
301 SET_NETDEV_DEV(dev, &link->dev); 297 SET_NETDEV_DEV(dev, &link->dev);
302 298
303 i = com20020_found(dev, 0); /* calls register_netdev */ 299 i = com20020_found(dev, 0); /* calls register_netdev */
@@ -305,12 +301,9 @@ static int com20020_config(struct pcmcia_device *link)
305 if (i != 0) { 301 if (i != 0) {
306 dev_printk(KERN_NOTICE, &link->dev, 302 dev_printk(KERN_NOTICE, &link->dev,
307 "com20020_cs: com20020_found() failed\n"); 303 "com20020_cs: com20020_found() failed\n");
308 link->dev_node = NULL;
309 goto failed; 304 goto failed;
310 } 305 }
311 306
312 strcpy(info->node.dev_name, dev->name);
313
314 dev_dbg(&link->dev,KERN_INFO "%s: port %#3lx, irq %d\n", 307 dev_dbg(&link->dev,KERN_INFO "%s: port %#3lx, irq %d\n",
315 dev->name, dev->base_addr, dev->irq); 308 dev->name, dev->base_addr, dev->irq);
316 return 0; 309 return 0;
diff --git a/drivers/net/pcmcia/fmvj18x_cs.c b/drivers/net/pcmcia/fmvj18x_cs.c
index 31f1a037737c..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;
@@ -274,8 +273,7 @@ static void fmvj18x_detach(struct pcmcia_device *link)
274 273
275 dev_dbg(&link->dev, "fmvj18x_detach\n"); 274 dev_dbg(&link->dev, "fmvj18x_detach\n");
276 275
277 if (link->dev_node) 276 unregister_netdev(dev);
278 unregister_netdev(dev);
279 277
280 fmvj18x_release(link); 278 fmvj18x_release(link);
281 279
@@ -523,17 +521,13 @@ static int fmvj18x_config(struct pcmcia_device *link)
523 } 521 }
524 522
525 lp->cardtype = cardtype; 523 lp->cardtype = cardtype;
526 link->dev_node = &lp->node;
527 SET_NETDEV_DEV(dev, &link->dev); 524 SET_NETDEV_DEV(dev, &link->dev);
528 525
529 if (register_netdev(dev) != 0) { 526 if (register_netdev(dev) != 0) {
530 printk(KERN_NOTICE "fmvj18x_cs: register_netdev() failed\n"); 527 printk(KERN_NOTICE "fmvj18x_cs: register_netdev() failed\n");
531 link->dev_node = NULL;
532 goto failed; 528 goto failed;
533 } 529 }
534 530
535 strcpy(lp->node.dev_name, dev->name);
536
537 /* print current configuration */ 531 /* print current configuration */
538 printk(KERN_INFO "%s: %s, sram %s, port %#3lx, irq %d, " 532 printk(KERN_INFO "%s: %s, sram %s, port %#3lx, irq %d, "
539 "hw_addr %pM\n", 533 "hw_addr %pM\n",
diff --git a/drivers/net/pcmcia/ibmtr_cs.c b/drivers/net/pcmcia/ibmtr_cs.c
index 0225cdffa4b9..2e42d80f8cae 100644
--- a/drivers/net/pcmcia/ibmtr_cs.c
+++ b/drivers/net/pcmcia/ibmtr_cs.c
@@ -104,7 +104,6 @@ static void ibmtr_detach(struct pcmcia_device *p_dev);
104typedef struct ibmtr_dev_t { 104typedef struct ibmtr_dev_t {
105 struct pcmcia_device *p_dev; 105 struct pcmcia_device *p_dev;
106 struct net_device *dev; 106 struct net_device *dev;
107 dev_node_t node;
108 window_handle_t sram_win_handle; 107 window_handle_t sram_win_handle;
109 struct tok_info *ti; 108 struct tok_info *ti;
110} ibmtr_dev_t; 109} ibmtr_dev_t;
@@ -190,8 +189,7 @@ static void ibmtr_detach(struct pcmcia_device *link)
190 */ 189 */
191 ti->sram_phys |= 1; 190 ti->sram_phys |= 1;
192 191
193 if (link->dev_node) 192 unregister_netdev(dev);
194 unregister_netdev(dev);
195 193
196 del_timer_sync(&(ti->tr_timer)); 194 del_timer_sync(&(ti->tr_timer));
197 195
@@ -289,18 +287,14 @@ static int __devinit ibmtr_config(struct pcmcia_device *link)
289 Adapters Technical Reference" SC30-3585 for this info. */ 287 Adapters Technical Reference" SC30-3585 for this info. */
290 ibmtr_hw_setup(dev, mmiobase); 288 ibmtr_hw_setup(dev, mmiobase);
291 289
292 link->dev_node = &info->node;
293 SET_NETDEV_DEV(dev, &link->dev); 290 SET_NETDEV_DEV(dev, &link->dev);
294 291
295 i = ibmtr_probe_card(dev); 292 i = ibmtr_probe_card(dev);
296 if (i != 0) { 293 if (i != 0) {
297 printk(KERN_NOTICE "ibmtr_cs: register_netdev() failed\n"); 294 printk(KERN_NOTICE "ibmtr_cs: register_netdev() failed\n");
298 link->dev_node = NULL;
299 goto failed; 295 goto failed;
300 } 296 }
301 297
302 strcpy(info->node.dev_name, dev->name);
303
304 printk(KERN_INFO 298 printk(KERN_INFO
305 "%s: port %#3lx, irq %d, mmio %#5lx, sram %#5lx, hwaddr=%pM\n", 299 "%s: port %#3lx, irq %d, mmio %#5lx, sram %#5lx, hwaddr=%pM\n",
306 dev->name, dev->base_addr, dev->irq, 300 dev->name, dev->base_addr, dev->irq,
diff --git a/drivers/net/pcmcia/nmclan_cs.c b/drivers/net/pcmcia/nmclan_cs.c
index b779e3a0b4dd..d8a3b3cf246e 100644
--- a/drivers/net/pcmcia/nmclan_cs.c
+++ b/drivers/net/pcmcia/nmclan_cs.c
@@ -363,7 +363,6 @@ typedef struct _mace_statistics {
363 363
364typedef struct _mace_private { 364typedef struct _mace_private {
365 struct pcmcia_device *p_dev; 365 struct pcmcia_device *p_dev;
366 dev_node_t node;
367 struct net_device_stats linux_stats; /* Linux statistics counters */ 366 struct net_device_stats linux_stats; /* Linux statistics counters */
368 mace_statistics mace_stats; /* MACE chip statistics counters */ 367 mace_statistics mace_stats; /* MACE chip statistics counters */
369 368
@@ -491,8 +490,7 @@ static void nmclan_detach(struct pcmcia_device *link)
491 490
492 dev_dbg(&link->dev, "nmclan_detach\n"); 491 dev_dbg(&link->dev, "nmclan_detach\n");
493 492
494 if (link->dev_node) 493 unregister_netdev(dev);
495 unregister_netdev(dev);
496 494
497 nmclan_release(link); 495 nmclan_release(link);
498 496
@@ -696,18 +694,14 @@ static int nmclan_config(struct pcmcia_device *link)
696 else 694 else
697 printk(KERN_NOTICE "nmclan_cs: invalid if_port requested\n"); 695 printk(KERN_NOTICE "nmclan_cs: invalid if_port requested\n");
698 696
699 link->dev_node = &lp->node;
700 SET_NETDEV_DEV(dev, &link->dev); 697 SET_NETDEV_DEV(dev, &link->dev);
701 698
702 i = register_netdev(dev); 699 i = register_netdev(dev);
703 if (i != 0) { 700 if (i != 0) {
704 printk(KERN_NOTICE "nmclan_cs: register_netdev() failed\n"); 701 printk(KERN_NOTICE "nmclan_cs: register_netdev() failed\n");
705 link->dev_node = NULL;
706 goto failed; 702 goto failed;
707 } 703 }
708 704
709 strcpy(lp->node.dev_name, dev->name);
710
711 printk(KERN_INFO "%s: nmclan: port %#3lx, irq %d, %s port," 705 printk(KERN_INFO "%s: nmclan: port %#3lx, irq %d, %s port,"
712 " hw_addr %pM\n", 706 " hw_addr %pM\n",
713 dev->name, dev->base_addr, dev->irq, if_names[dev->if_port], 707 dev->name, dev->base_addr, dev->irq, if_names[dev->if_port],
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c
index af09be487577..6f77a768ba88 100644
--- a/drivers/net/pcmcia/pcnet_cs.c
+++ b/drivers/net/pcmcia/pcnet_cs.c
@@ -208,7 +208,6 @@ static hw_info_t dl10022_info = { 0, 0, 0, 0, IS_DL10022|HAS_MII };
208 208
209typedef struct pcnet_dev_t { 209typedef struct pcnet_dev_t {
210 struct pcmcia_device *p_dev; 210 struct pcmcia_device *p_dev;
211 dev_node_t node;
212 u_int flags; 211 u_int flags;
213 void __iomem *base; 212 void __iomem *base;
214 struct timer_list watchdog; 213 struct timer_list watchdog;
@@ -287,8 +286,7 @@ static void pcnet_detach(struct pcmcia_device *link)
287 286
288 dev_dbg(&link->dev, "pcnet_detach\n"); 287 dev_dbg(&link->dev, "pcnet_detach\n");
289 288
290 if (link->dev_node) 289 unregister_netdev(dev);
291 unregister_netdev(dev);
292 290
293 pcnet_release(link); 291 pcnet_release(link);
294 292
@@ -639,17 +637,13 @@ static int pcnet_config(struct pcmcia_device *link)
639 if (info->flags & (IS_DL10019|IS_DL10022)) 637 if (info->flags & (IS_DL10019|IS_DL10022))
640 mii_phy_probe(dev); 638 mii_phy_probe(dev);
641 639
642 link->dev_node = &info->node;
643 SET_NETDEV_DEV(dev, &link->dev); 640 SET_NETDEV_DEV(dev, &link->dev);
644 641
645 if (register_netdev(dev) != 0) { 642 if (register_netdev(dev) != 0) {
646 printk(KERN_NOTICE "pcnet_cs: register_netdev() failed\n"); 643 printk(KERN_NOTICE "pcnet_cs: register_netdev() failed\n");
647 link->dev_node = NULL;
648 goto failed; 644 goto failed;
649 } 645 }
650 646
651 strcpy(info->node.dev_name, dev->name);
652
653 if (info->flags & (IS_DL10019|IS_DL10022)) { 647 if (info->flags & (IS_DL10019|IS_DL10022)) {
654 u_char id = inb(dev->base_addr + 0x1a); 648 u_char id = inb(dev->base_addr + 0x1a);
655 printk(KERN_INFO "%s: NE2000 (DL100%d rev %02x): ", 649 printk(KERN_INFO "%s: NE2000 (DL100%d rev %02x): ",
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c
index ad061c7106b5..59796e7d09c4 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,7 +322,6 @@ 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;
@@ -361,8 +359,7 @@ static void smc91c92_detach(struct pcmcia_device *link)
361 359
362 dev_dbg(&link->dev, "smc91c92_detach\n"); 360 dev_dbg(&link->dev, "smc91c92_detach\n");
363 361
364 if (link->dev_node) 362 unregister_netdev(dev);
365 unregister_netdev(dev);
366 363
367 smc91c92_release(link); 364 smc91c92_release(link);
368 365
@@ -956,17 +953,13 @@ static int smc91c92_config(struct pcmcia_device *link)
956 SMC_SELECT_BANK(0); 953 SMC_SELECT_BANK(0);
957 } 954 }
958 955
959 link->dev_node = &smc->node;
960 SET_NETDEV_DEV(dev, &link->dev); 956 SET_NETDEV_DEV(dev, &link->dev);
961 957
962 if (register_netdev(dev) != 0) { 958 if (register_netdev(dev) != 0) {
963 printk(KERN_ERR "smc91c92_cs: register_netdev() failed\n"); 959 printk(KERN_ERR "smc91c92_cs: register_netdev() failed\n");
964 link->dev_node = NULL;
965 goto config_undo; 960 goto config_undo;
966 } 961 }
967 962
968 strcpy(smc->node.dev_name, dev->name);
969
970 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, "
971 "hw_addr %pM\n", 964 "hw_addr %pM\n",
972 dev->name, name, (rev & 0x0f), dev->base_addr, dev->irq, 965 dev->name, name, (rev & 0x0f), dev->base_addr, dev->irq,
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c
index c9e7d7d47835..5e6b62ba8887 100644
--- a/drivers/net/pcmcia/xirc2ps_cs.c
+++ b/drivers/net/pcmcia/xirc2ps_cs.c
@@ -297,31 +297,9 @@ static void xirc2ps_detach(struct pcmcia_device *p_dev);
297 297
298static irqreturn_t xirc2ps_interrupt(int irq, void *dev_id); 298static irqreturn_t xirc2ps_interrupt(int irq, void *dev_id);
299 299
300/****************
301 * A linked list of "instances" of the device. Each actual
302 * PCMCIA card corresponds to one device instance, and is described
303 * by one struct pcmcia_device structure (defined in ds.h).
304 *
305 * You may not want to use a linked list for this -- for example, the
306 * memory card driver uses an array of struct pcmcia_device pointers, where minor
307 * device numbers are used to derive the corresponding array index.
308 */
309
310/****************
311 * A driver needs to provide a dev_node_t structure for each device
312 * on a card. In some cases, there is only one device per card (for
313 * example, ethernet cards, modems). In other cases, there may be
314 * many actual or logical devices (SCSI adapters, memory cards with
315 * multiple partitions). The dev_node_t structures need to be kept
316 * in a linked list starting at the 'dev' field of a struct pcmcia_device
317 * structure. We allocate them in the card's private data structure,
318 * because they generally can't be allocated dynamically.
319 */
320
321typedef struct local_info_t { 300typedef struct local_info_t {
322 struct net_device *dev; 301 struct net_device *dev;
323 struct pcmcia_device *p_dev; 302 struct pcmcia_device *p_dev;
324 dev_node_t node;
325 303
326 int card_type; 304 int card_type;
327 int probe_port; 305 int probe_port;
@@ -579,8 +557,7 @@ xirc2ps_detach(struct pcmcia_device *link)
579 557
580 dev_dbg(&link->dev, "detach\n"); 558 dev_dbg(&link->dev, "detach\n");
581 559
582 if (link->dev_node) 560 unregister_netdev(dev);
583 unregister_netdev(dev);
584 561
585 xirc2ps_release(link); 562 xirc2ps_release(link);
586 563
@@ -985,17 +962,13 @@ xirc2ps_config(struct pcmcia_device * link)
985 if (local->dingo) 962 if (local->dingo)
986 do_reset(dev, 1); /* a kludge to make the cem56 work */ 963 do_reset(dev, 1); /* a kludge to make the cem56 work */
987 964
988 link->dev_node = &local->node;
989 SET_NETDEV_DEV(dev, &link->dev); 965 SET_NETDEV_DEV(dev, &link->dev);
990 966
991 if ((err=register_netdev(dev))) { 967 if ((err=register_netdev(dev))) {
992 printk(KNOT_XIRC "register_netdev() failed\n"); 968 printk(KNOT_XIRC "register_netdev() failed\n");
993 link->dev_node = NULL;
994 goto config_error; 969 goto config_error;
995 } 970 }
996 971
997 strcpy(local->node.dev_name, dev->name);
998
999 /* give some infos about the hardware */ 972 /* give some infos about the hardware */
1000 printk(KERN_INFO "%s: %s: port %#3lx, irq %d, hwaddr %pM\n", 973 printk(KERN_INFO "%s: %s: port %#3lx, irq %d, hwaddr %pM\n",
1001 dev->name, local->manf_str,(u_long)dev->base_addr, (int)dev->irq, 974 dev->name, local->manf_str,(u_long)dev->base_addr, (int)dev->irq,
diff --git a/drivers/net/wireless/orinoco/orinoco_cs.c b/drivers/net/wireless/orinoco/orinoco_cs.c
index 5d29b11fdbc0..03056ab73032 100644
--- a/drivers/net/wireless/orinoco/orinoco_cs.c
+++ b/drivers/net/wireless/orinoco/orinoco_cs.c
@@ -50,7 +50,6 @@ MODULE_PARM_DESC(ignore_cis_vcc, "Allow voltage mismatch between card and socket
50 * struct orinoco_private */ 50 * struct orinoco_private */
51struct orinoco_pccard { 51struct orinoco_pccard {
52 struct pcmcia_device *p_dev; 52 struct pcmcia_device *p_dev;
53 dev_node_t node;
54 53
55 /* Used to handle hard reset */ 54 /* Used to handle hard reset */
56 /* yuck, we need this hack to work around the insanity of the 55 /* yuck, we need this hack to work around the insanity of the
@@ -140,8 +139,7 @@ static void orinoco_cs_detach(struct pcmcia_device *link)
140{ 139{
141 struct orinoco_private *priv = link->priv; 140 struct orinoco_private *priv = link->priv;
142 141
143 if (link->dev_node) 142 orinoco_if_del(priv);
144 orinoco_if_del(priv);
145 143
146 orinoco_cs_release(link); 144 orinoco_cs_release(link);
147 145
@@ -226,7 +224,6 @@ static int
226orinoco_cs_config(struct pcmcia_device *link) 224orinoco_cs_config(struct pcmcia_device *link)
227{ 225{
228 struct orinoco_private *priv = link->priv; 226 struct orinoco_private *priv = link->priv;
229 struct orinoco_pccard *card = priv->card;
230 hermes_t *hw = &priv->hw; 227 hermes_t *hw = &priv->hw;
231 int ret; 228 int ret;
232 void __iomem *mem; 229 void __iomem *mem;
@@ -276,9 +273,6 @@ orinoco_cs_config(struct pcmcia_device *link)
276 if (ret) 273 if (ret)
277 goto failed; 274 goto failed;
278 275
279 /* Ok, we have the configuration, prepare to register the netdev */
280 card->node.major = card->node.minor = 0;
281
282 /* Initialise the main driver */ 276 /* Initialise the main driver */
283 if (orinoco_init(priv) != 0) { 277 if (orinoco_init(priv) != 0) {
284 printk(KERN_ERR PFX "orinoco_init() failed\n"); 278 printk(KERN_ERR PFX "orinoco_init() failed\n");
@@ -292,12 +286,6 @@ orinoco_cs_config(struct pcmcia_device *link)
292 goto failed; 286 goto failed;
293 } 287 }
294 288
295 /* At this point, the dev_node_t structure(s) needs to be
296 * initialized and arranged in a linked list at link->dev_node. */
297 strcpy(card->node.dev_name, priv->ndev->name);
298 link->dev_node = &card->node; /* link->dev_node being non-NULL is also
299 * used to indicate that the
300 * net_device has been registered */
301 return 0; 289 return 0;
302 290
303 failed: 291 failed:
diff --git a/drivers/net/wireless/orinoco/spectrum_cs.c b/drivers/net/wireless/orinoco/spectrum_cs.c
index 7a8e056cd62d..41b9ce425855 100644
--- a/drivers/net/wireless/orinoco/spectrum_cs.c
+++ b/drivers/net/wireless/orinoco/spectrum_cs.c
@@ -57,7 +57,6 @@ MODULE_PARM_DESC(ignore_cis_vcc, "Allow voltage mismatch between card and socket
57 * struct orinoco_private */ 57 * struct orinoco_private */
58struct orinoco_pccard { 58struct orinoco_pccard {
59 struct pcmcia_device *p_dev; 59 struct pcmcia_device *p_dev;
60 dev_node_t node;
61}; 60};
62 61
63/********************************************************************/ 62/********************************************************************/
@@ -214,8 +213,7 @@ static void spectrum_cs_detach(struct pcmcia_device *link)
214{ 213{
215 struct orinoco_private *priv = link->priv; 214 struct orinoco_private *priv = link->priv;
216 215
217 if (link->dev_node) 216 orinoco_if_del(priv);
218 orinoco_if_del(priv);
219 217
220 spectrum_cs_release(link); 218 spectrum_cs_release(link);
221 219
@@ -300,7 +298,6 @@ static int
300spectrum_cs_config(struct pcmcia_device *link) 298spectrum_cs_config(struct pcmcia_device *link)
301{ 299{
302 struct orinoco_private *priv = link->priv; 300 struct orinoco_private *priv = link->priv;
303 struct orinoco_pccard *card = priv->card;
304 hermes_t *hw = &priv->hw; 301 hermes_t *hw = &priv->hw;
305 int ret; 302 int ret;
306 void __iomem *mem; 303 void __iomem *mem;
@@ -350,9 +347,6 @@ spectrum_cs_config(struct pcmcia_device *link)
350 if (ret) 347 if (ret)
351 goto failed; 348 goto failed;
352 349
353 /* Ok, we have the configuration, prepare to register the netdev */
354 card->node.major = card->node.minor = 0;
355
356 /* Reset card */ 350 /* Reset card */
357 if (spectrum_cs_hard_reset(priv) != 0) 351 if (spectrum_cs_hard_reset(priv) != 0)
358 goto failed; 352 goto failed;
@@ -370,12 +364,6 @@ spectrum_cs_config(struct pcmcia_device *link)
370 goto failed; 364 goto failed;
371 } 365 }
372 366
373 /* At this point, the dev_node_t structure(s) needs to be
374 * initialized and arranged in a linked list at link->dev_node. */
375 strcpy(card->node.dev_name, priv->ndev->name);
376 link->dev_node = &card->node; /* link->dev_node being non-NULL is also
377 * used to indicate that the
378 * net_device has been registered */
379 return 0; 367 return 0;
380 368
381 failed: 369 failed:
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
index fe4642a49bfb..18a93f1adcc4 100644
--- a/drivers/net/wireless/ray_cs.c
+++ b/drivers/net/wireless/ray_cs.c
@@ -379,8 +379,7 @@ static void ray_detach(struct pcmcia_device *link)
379 del_timer(&local->timer); 379 del_timer(&local->timer);
380 380
381 if (link->priv) { 381 if (link->priv) {
382 if (link->dev_node) 382 unregister_netdev(dev);
383 unregister_netdev(dev);
384 free_netdev(dev); 383 free_netdev(dev);
385 } 384 }
386 dev_dbg(&link->dev, "ray_cs ray_detach ending\n"); 385 dev_dbg(&link->dev, "ray_cs ray_detach ending\n");
@@ -489,9 +488,6 @@ static int ray_config(struct pcmcia_device *link)
489 return i; 488 return i;
490 } 489 }
491 490
492 strcpy(local->node.dev_name, dev->name);
493 link->dev_node = &local->node;
494
495 printk(KERN_INFO "%s: RayLink, irq %d, hw_addr %pM\n", 491 printk(KERN_INFO "%s: RayLink, irq %d, hw_addr %pM\n",
496 dev->name, dev->irq, dev->dev_addr); 492 dev->name, dev->irq, dev->dev_addr);
497 493
diff --git a/drivers/net/wireless/ray_cs.h b/drivers/net/wireless/ray_cs.h
index 1e23b7f4cca7..9f01ddb19748 100644
--- a/drivers/net/wireless/ray_cs.h
+++ b/drivers/net/wireless/ray_cs.h
@@ -25,7 +25,6 @@ struct beacon_rx {
25typedef struct ray_dev_t { 25typedef struct ray_dev_t {
26 int card_status; 26 int card_status;
27 int authentication_state; 27 int authentication_state;
28 dev_node_t node;
29 window_handle_t amem_handle; /* handle to window for attribute memory */ 28 window_handle_t amem_handle; /* handle to window for attribute memory */
30 window_handle_t rmem_handle; /* handle to window for rx buffer on card */ 29 window_handle_t rmem_handle; /* handle to window for rx buffer on card */
31 void __iomem *sram; /* pointer to beginning of shared RAM */ 30 void __iomem *sram; /* pointer to beginning of shared RAM */
diff --git a/drivers/net/wireless/wl3501.h b/drivers/net/wireless/wl3501.h
index 8bce1a550a22..8816e371fd0e 100644
--- a/drivers/net/wireless/wl3501.h
+++ b/drivers/net/wireless/wl3501.h
@@ -610,7 +610,6 @@ struct wl3501_card {
610 struct iw_statistics wstats; 610 struct iw_statistics wstats;
611 struct iw_spy_data spy_data; 611 struct iw_spy_data spy_data;
612 struct iw_public_data wireless_data; 612 struct iw_public_data wireless_data;
613 struct dev_node_t node;
614 struct pcmcia_device *p_dev; 613 struct pcmcia_device *p_dev;
615}; 614};
616#endif 615#endif
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c
index c43f05b98c4e..5e5d24c1ce2b 100644
--- a/drivers/net/wireless/wl3501_cs.c
+++ b/drivers/net/wireless/wl3501_cs.c
@@ -1451,6 +1451,8 @@ static void wl3501_detach(struct pcmcia_device *link)
1451 netif_device_detach(dev); 1451 netif_device_detach(dev);
1452 wl3501_release(link); 1452 wl3501_release(link);
1453 1453
1454 unregister_netdev(dev);
1455
1454 if (link->priv) 1456 if (link->priv)
1455 free_netdev(link->priv); 1457 free_netdev(link->priv);
1456 1458
@@ -1977,20 +1979,15 @@ static int wl3501_config(struct pcmcia_device *link)
1977 } 1979 }
1978 1980
1979 this = netdev_priv(dev); 1981 this = netdev_priv(dev);
1980 /*
1981 * At this point, the dev_node_t structure(s) should be initialized and
1982 * arranged in a linked list at link->dev_node.
1983 */
1984 link->dev_node = &this->node;
1985 1982
1986 this->base_addr = dev->base_addr; 1983 this->base_addr = dev->base_addr;
1987 1984
1988 if (!wl3501_get_flash_mac_addr(this)) { 1985 if (!wl3501_get_flash_mac_addr(this)) {
1989 printk(KERN_WARNING "%s: Cant read MAC addr in flash ROM?\n", 1986 printk(KERN_WARNING "%s: Cant read MAC addr in flash ROM?\n",
1990 dev->name); 1987 dev->name);
1988 unregister_netdev(dev);
1991 goto failed; 1989 goto failed;
1992 } 1990 }
1993 strcpy(this->node.dev_name, dev->name);
1994 1991
1995 for (i = 0; i < 6; i++) 1992 for (i = 0; i < 6; i++)
1996 dev->dev_addr[i] = ((char *)&this->mac_addr)[i]; 1993 dev->dev_addr[i] = ((char *)&this->mac_addr)[i];
@@ -2034,12 +2031,6 @@ failed:
2034 */ 2031 */
2035static void wl3501_release(struct pcmcia_device *link) 2032static void wl3501_release(struct pcmcia_device *link)
2036{ 2033{
2037 struct net_device *dev = link->priv;
2038
2039 /* Unlink the device chain */
2040 if (link->dev_node)
2041 unregister_netdev(dev);
2042
2043 pcmcia_disable_device(link); 2034 pcmcia_disable_device(link);
2044} 2035}
2045 2036