diff options
author | Pavel Roskin <proski@gnu.org> | 2006-05-01 02:13:24 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2006-05-05 17:10:40 -0400 |
commit | e4f4f98efdb4619ab95eb724fd5e0c4675307cc1 (patch) | |
tree | 1ba191d656aaf340bf35788e2f90ad613b9e384e /drivers/net/wireless | |
parent | 6274115ce9f0c87068761b2ba5b0b2f7d13c17cf (diff) | |
download | talos-op-linux-e4f4f98efdb4619ab95eb724fd5e0c4675307cc1.tar.gz talos-op-linux-e4f4f98efdb4619ab95eb724fd5e0c4675307cc1.zip |
[PATCH] orinoco: unregister network device before releasing PCMCIA resources
Hardware resources should not be made available to other devices while
the network device is still registered. Also remove the related debug
statements.
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/orinoco_cs.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/spectrum_cs.c | 9 |
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) { struct net_device *dev = link->priv; + if (link->dev_node) + unregister_netdev(dev); + orinoco_cs_release(link); - DEBUG(0, PFX "detach: link=%p link->dev_node=%p\n", link, link->dev_node); - if (link->dev_node) { - DEBUG(0, PFX "About to unregister net device %p\n", - dev); - unregister_netdev(dev); - } free_orinocodev(dev); } /* orinoco_cs_detach */ 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) { struct net_device *dev = link->priv; + if (link->dev_node) + unregister_netdev(dev); + spectrum_cs_release(link); - DEBUG(0, PFX "detach: link=%p link->dev_node=%p\n", link, link->dev_node); - if (link->dev_node) { - DEBUG(0, PFX "About to unregister net device %p\n", - dev); - unregister_netdev(dev); - } free_orinocodev(dev); } /* spectrum_cs_detach */ |