From: Adam Belay <ambx1@neo.rr.com>

This patch updates pcmcia network drivers so that their class devices are
linked to the correct physical device.

Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/drivers/net/pcmcia/3c574_cs.c    |    1 +
 25-akpm/drivers/net/pcmcia/3c589_cs.c    |    1 +
 25-akpm/drivers/net/pcmcia/axnet_cs.c    |    1 +
 25-akpm/drivers/net/pcmcia/com20020_cs.c |    1 +
 25-akpm/drivers/net/pcmcia/fmvj18x_cs.c  |    1 +
 25-akpm/drivers/net/pcmcia/ibmtr_cs.c    |    1 +
 25-akpm/drivers/net/pcmcia/nmclan_cs.c   |    1 +
 25-akpm/drivers/net/pcmcia/pcnet_cs.c    |    1 +
 25-akpm/drivers/net/pcmcia/smc91c92_cs.c |    1 +
 25-akpm/drivers/net/pcmcia/xirc2ps_cs.c  |    1 +
 10 files changed, 10 insertions(+)

diff -puN drivers/net/pcmcia/3c574_cs.c~pcmcia-update-network-drivers drivers/net/pcmcia/3c574_cs.c
--- 25/drivers/net/pcmcia/3c574_cs.c~pcmcia-update-network-drivers	2004-08-30 00:50:32.047892384 -0700
+++ 25-akpm/drivers/net/pcmcia/3c574_cs.c	2004-08-30 00:50:32.065889648 -0700
@@ -519,6 +519,7 @@ static void tc574_config(dev_link_t *lin
 
 	link->state &= ~DEV_CONFIG_PENDING;
 	link->dev = &lp->node;
+	SET_NETDEV_DEV(dev, pcmcia_lookup_device(handle));
 
 	if (register_netdev(dev) != 0) {
 		printk(KERN_NOTICE "3c574_cs: register_netdev() failed\n");
diff -puN drivers/net/pcmcia/3c589_cs.c~pcmcia-update-network-drivers drivers/net/pcmcia/3c589_cs.c
--- 25/drivers/net/pcmcia/3c589_cs.c~pcmcia-update-network-drivers	2004-08-30 00:50:32.049892080 -0700
+++ 25-akpm/drivers/net/pcmcia/3c589_cs.c	2004-08-30 00:50:32.066889496 -0700
@@ -391,6 +391,7 @@ static void tc589_config(dev_link_t *lin
     
     link->dev = &lp->node;
     link->state &= ~DEV_CONFIG_PENDING;
+    SET_NETDEV_DEV(dev, pcmcia_lookup_device(handle));
 
     if (register_netdev(dev) != 0) {
 	printk(KERN_ERR "3c589_cs: register_netdev() failed\n");
diff -puN drivers/net/pcmcia/axnet_cs.c~pcmcia-update-network-drivers drivers/net/pcmcia/axnet_cs.c
--- 25/drivers/net/pcmcia/axnet_cs.c~pcmcia-update-network-drivers	2004-08-30 00:50:32.050891928 -0700
+++ 25-akpm/drivers/net/pcmcia/axnet_cs.c	2004-08-30 00:50:32.067889344 -0700
@@ -458,6 +458,7 @@ static void axnet_config(dev_link_t *lin
     info->phy_id = (i < 32) ? i : -1;
     link->dev = &info->node;
     link->state &= ~DEV_CONFIG_PENDING;
+    SET_NETDEV_DEV(dev, pcmcia_lookup_device(handle));
 
     if (register_netdev(dev) != 0) {
 	printk(KERN_NOTICE "axnet_cs: register_netdev() failed\n");
diff -puN drivers/net/pcmcia/com20020_cs.c~pcmcia-update-network-drivers drivers/net/pcmcia/com20020_cs.c
--- 25/drivers/net/pcmcia/com20020_cs.c~pcmcia-update-network-drivers	2004-08-30 00:50:32.052891624 -0700
+++ 25-akpm/drivers/net/pcmcia/com20020_cs.c	2004-08-30 00:50:32.068889192 -0700
@@ -394,6 +394,7 @@ static void com20020_config(dev_link_t *
 
     link->dev = &info->node;
     link->state &= ~DEV_CONFIG_PENDING;
+    SET_NETDEV_DEV(dev, pcmcia_lookup_device(handle));
 
     i = com20020_found(dev, 0);	/* calls register_netdev */
     
diff -puN drivers/net/pcmcia/fmvj18x_cs.c~pcmcia-update-network-drivers drivers/net/pcmcia/fmvj18x_cs.c
--- 25/drivers/net/pcmcia/fmvj18x_cs.c~pcmcia-update-network-drivers	2004-08-30 00:50:32.053891472 -0700
+++ 25-akpm/drivers/net/pcmcia/fmvj18x_cs.c	2004-08-30 00:50:32.069889040 -0700
@@ -591,6 +591,7 @@ static void fmvj18x_config(dev_link_t *l
     lp->cardtype = cardtype;
     link->dev = &lp->node;
     link->state &= ~DEV_CONFIG_PENDING;
+    SET_NETDEV_DEV(dev, pcmcia_lookup_device(handle));
 
     if (register_netdev(dev) != 0) {
 	printk(KERN_NOTICE "fmvj18x_cs: register_netdev() failed\n");
diff -puN drivers/net/pcmcia/ibmtr_cs.c~pcmcia-update-network-drivers drivers/net/pcmcia/ibmtr_cs.c
--- 25/drivers/net/pcmcia/ibmtr_cs.c~pcmcia-update-network-drivers	2004-08-30 00:50:32.055891168 -0700
+++ 25-akpm/drivers/net/pcmcia/ibmtr_cs.c	2004-08-30 00:50:32.070888888 -0700
@@ -366,6 +366,7 @@ static void ibmtr_config(dev_link_t *lin
 
     link->dev = &info->node;
     link->state &= ~DEV_CONFIG_PENDING;
+    SET_NETDEV_DEV(dev, pcmcia_lookup_device(handle));
 
     i = ibmtr_probe_card(dev);
     if (i != 0) {
diff -puN drivers/net/pcmcia/nmclan_cs.c~pcmcia-update-network-drivers drivers/net/pcmcia/nmclan_cs.c
--- 25/drivers/net/pcmcia/nmclan_cs.c~pcmcia-update-network-drivers	2004-08-30 00:50:32.056891016 -0700
+++ 25-akpm/drivers/net/pcmcia/nmclan_cs.c	2004-08-30 00:50:32.071888736 -0700
@@ -775,6 +775,7 @@ static void nmclan_config(dev_link_t *li
 
   link->dev = &lp->node;
   link->state &= ~DEV_CONFIG_PENDING;
+  SET_NETDEV_DEV(dev, pcmcia_lookup_device(handle));
 
   i = register_netdev(dev);
   if (i != 0) {
diff -puN drivers/net/pcmcia/pcnet_cs.c~pcmcia-update-network-drivers drivers/net/pcmcia/pcnet_cs.c
--- 25/drivers/net/pcmcia/pcnet_cs.c~pcmcia-update-network-drivers	2004-08-30 00:50:32.058890712 -0700
+++ 25-akpm/drivers/net/pcmcia/pcnet_cs.c	2004-08-30 00:50:32.073888432 -0700
@@ -722,6 +722,7 @@ static void pcnet_config(dev_link_t *lin
 
     link->dev = &info->node;
     link->state &= ~DEV_CONFIG_PENDING;
+    SET_NETDEV_DEV(dev, pcmcia_lookup_device(handle));
 
 #ifdef CONFIG_NET_POLL_CONTROLLER
     dev->poll_controller = ei_poll;
diff -puN drivers/net/pcmcia/smc91c92_cs.c~pcmcia-update-network-drivers drivers/net/pcmcia/smc91c92_cs.c
--- 25/drivers/net/pcmcia/smc91c92_cs.c~pcmcia-update-network-drivers	2004-08-30 00:50:32.059890560 -0700
+++ 25-akpm/drivers/net/pcmcia/smc91c92_cs.c	2004-08-30 00:50:32.075888128 -0700
@@ -1024,6 +1024,7 @@ static void smc91c92_config(dev_link_t *
 
     link->dev = &smc->node;
     link->state &= ~DEV_CONFIG_PENDING;
+    SET_NETDEV_DEV(dev, pcmcia_lookup_device(handle));
 
     if (register_netdev(dev) != 0) {
 	printk(KERN_ERR "smc91c92_cs: register_netdev() failed\n");
diff -puN drivers/net/pcmcia/xirc2ps_cs.c~pcmcia-update-network-drivers drivers/net/pcmcia/xirc2ps_cs.c
--- 25/drivers/net/pcmcia/xirc2ps_cs.c~pcmcia-update-network-drivers	2004-08-30 00:50:32.061890256 -0700
+++ 25-akpm/drivers/net/pcmcia/xirc2ps_cs.c	2004-08-30 00:50:32.076887976 -0700
@@ -1121,6 +1121,7 @@ xirc2ps_config(dev_link_t * link)
 
     link->dev = &local->node;
     link->state &= ~DEV_CONFIG_PENDING;
+    SET_NETDEV_DEV(dev, pcmcia_lookup_device(handle));
 
     if ((err=register_netdev(dev))) {
 	printk(KNOT_XIRC "register_netdev() failed\n");
_