Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 300570
b: refs/heads/master
c: 019d077
h: refs/heads/master
v: v3
  • Loading branch information
Francois Romieu committed Apr 7, 2012
1 parent fa99daf commit 6ebfbf2
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 31 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9b717075e96daed94a10b4b0aaeb88c4c4bb0da3
refs/heads/master: 019d077a530d2c6d6032ddd92a91520c3479ff05
56 changes: 26 additions & 30 deletions trunk/drivers/net/wireless/ipw2x00/ipw2100.c
Original file line number Diff line number Diff line change
Expand Up @@ -6421,50 +6421,46 @@ static int ipw2100_pci_init_one(struct pci_dev *pci_dev,
static void __devexit ipw2100_pci_remove_one(struct pci_dev *pci_dev)
{
struct ipw2100_priv *priv = pci_get_drvdata(pci_dev);
struct net_device *dev;
struct net_device *dev = priv->net_dev;

if (priv) {
mutex_lock(&priv->action_mutex);
mutex_lock(&priv->action_mutex);

priv->status &= ~STATUS_INITIALIZED;
priv->status &= ~STATUS_INITIALIZED;

dev = priv->net_dev;
sysfs_remove_group(&pci_dev->dev.kobj,
&ipw2100_attribute_group);
sysfs_remove_group(&pci_dev->dev.kobj, &ipw2100_attribute_group);

#ifdef CONFIG_PM
if (ipw2100_firmware.version)
ipw2100_release_firmware(priv, &ipw2100_firmware);
if (ipw2100_firmware.version)
ipw2100_release_firmware(priv, &ipw2100_firmware);
#endif
/* Take down the hardware */
ipw2100_down(priv);
/* Take down the hardware */
ipw2100_down(priv);

/* Release the mutex so that the network subsystem can
* complete any needed calls into the driver... */
mutex_unlock(&priv->action_mutex);
/* Release the mutex so that the network subsystem can
* complete any needed calls into the driver... */
mutex_unlock(&priv->action_mutex);

/* Unregister the device first - this results in close()
* being called if the device is open. If we free storage
* first, then close() will crash. */
unregister_netdev(dev);
/* Unregister the device first - this results in close()
* being called if the device is open. If we free storage
* first, then close() will crash.
* FIXME: remove the comment above. */
unregister_netdev(dev);

ipw2100_kill_works(priv);
ipw2100_kill_works(priv);

ipw2100_queues_free(priv);
ipw2100_queues_free(priv);

/* Free potential debugging firmware snapshot */
ipw2100_snapshot_free(priv);
/* Free potential debugging firmware snapshot */
ipw2100_snapshot_free(priv);

if (dev->irq)
free_irq(dev->irq, priv);
free_irq(dev->irq, priv);

pci_iounmap(pci_dev, priv->ioaddr);
pci_iounmap(pci_dev, priv->ioaddr);

/* wiphy_unregister needs to be here, before free_libipw */
wiphy_unregister(priv->ieee->wdev.wiphy);
kfree(priv->ieee->bg_band.channels);
free_libipw(dev, 0);
}
/* wiphy_unregister needs to be here, before free_libipw */
wiphy_unregister(priv->ieee->wdev.wiphy);
kfree(priv->ieee->bg_band.channels);
free_libipw(dev, 0);

pci_release_regions(pci_dev);
pci_disable_device(pci_dev);
Expand Down

0 comments on commit 6ebfbf2

Please sign in to comment.