aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/orinoco_cs.c9
-rw-r--r--drivers/net/wireless/spectrum_cs.c9
2 files changed, 6 insertions, 12 deletions
diff --git a/drivers/net/wireless/orinoco_cs.c b/drivers/net/wireless/orinoco_cs.c
index d2c48ac60f46..ee05ec6eda9d 100644
--- a/drivers/net/wireless/orinoco_cs.c
+++ b/drivers/net/wireless/orinoco_cs.c
@@ -147,14 +147,11 @@ static void orinoco_cs_detach(struct pcmcia_device *link)
147{ 147{
148 struct net_device *dev = link->priv; 148 struct net_device *dev = link->priv;
149 149
150 if (link->dev_node)
151 unregister_netdev(dev);
152
150 orinoco_cs_release(link); 153 orinoco_cs_release(link);
151 154
152 DEBUG(0, PFX "detach: link=%p link->dev_node=%p\n", link, link->dev_node);
153 if (link->dev_node) {
154 DEBUG(0, PFX "About to unregister net device %p\n",
155 dev);
156 unregister_netdev(dev);
157 }
158 free_orinocodev(dev); 155 free_orinocodev(dev);
159} /* orinoco_cs_detach */ 156} /* orinoco_cs_detach */
160 157
diff --git a/drivers/net/wireless/spectrum_cs.c b/drivers/net/wireless/spectrum_cs.c
index aeb38d938832..0921162097fe 100644
--- a/drivers/net/wireless/spectrum_cs.c
+++ b/drivers/net/wireless/spectrum_cs.c
@@ -625,14 +625,11 @@ static void spectrum_cs_detach(struct pcmcia_device *link)
625{ 625{
626 struct net_device *dev = link->priv; 626 struct net_device *dev = link->priv;
627 627
628 if (link->dev_node)
629 unregister_netdev(dev);
630
628 spectrum_cs_release(link); 631 spectrum_cs_release(link);
629 632
630 DEBUG(0, PFX "detach: link=%p link->dev_node=%p\n", link, link->dev_node);
631 if (link->dev_node) {
632 DEBUG(0, PFX "About to unregister net device %p\n",
633 dev);
634 unregister_netdev(dev);
635 }
636 free_orinocodev(dev); 633 free_orinocodev(dev);
637} /* spectrum_cs_detach */ 634} /* spectrum_cs_detach */
638 635