diff options
author | Francois Romieu <romieu@fr.zoreil.com> | 2012-03-24 06:47:40 -0400 |
---|---|---|
committer | Francois Romieu <romieu@fr.zoreil.com> | 2012-04-07 05:58:39 -0400 |
commit | 019d077a530d2c6d6032ddd92a91520c3479ff05 (patch) | |
tree | 81890badbedf9637e343b71affd68e7a898a61f6 /drivers/net/wireless/ipw2x00 | |
parent | 9b717075e96daed94a10b4b0aaeb88c4c4bb0da3 (diff) |
ipw2100: remove useless tests in the PCI device remove path.
Everything has been set up in the PCI probe function.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Stanislav Yakovlev <stas.yakovlev@gmail.com>
Diffstat (limited to 'drivers/net/wireless/ipw2x00')
-rw-r--r-- | drivers/net/wireless/ipw2x00/ipw2100.c | 56 |
1 files changed, 26 insertions, 30 deletions
diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c index 335299366988..3c06c6b093e9 100644 --- a/drivers/net/wireless/ipw2x00/ipw2100.c +++ b/drivers/net/wireless/ipw2x00/ipw2100.c | |||
@@ -6421,50 +6421,46 @@ out: | |||
6421 | static void __devexit ipw2100_pci_remove_one(struct pci_dev *pci_dev) | 6421 | static void __devexit ipw2100_pci_remove_one(struct pci_dev *pci_dev) |
6422 | { | 6422 | { |
6423 | struct ipw2100_priv *priv = pci_get_drvdata(pci_dev); | 6423 | struct ipw2100_priv *priv = pci_get_drvdata(pci_dev); |
6424 | struct net_device *dev; | 6424 | struct net_device *dev = priv->net_dev; |
6425 | 6425 | ||
6426 | if (priv) { | 6426 | mutex_lock(&priv->action_mutex); |
6427 | mutex_lock(&priv->action_mutex); | ||
6428 | 6427 | ||
6429 | priv->status &= ~STATUS_INITIALIZED; | 6428 | priv->status &= ~STATUS_INITIALIZED; |
6430 | 6429 | ||
6431 | dev = priv->net_dev; | 6430 | sysfs_remove_group(&pci_dev->dev.kobj, &ipw2100_attribute_group); |
6432 | sysfs_remove_group(&pci_dev->dev.kobj, | ||
6433 | &ipw2100_attribute_group); | ||
6434 | 6431 | ||
6435 | #ifdef CONFIG_PM | 6432 | #ifdef CONFIG_PM |
6436 | if (ipw2100_firmware.version) | 6433 | if (ipw2100_firmware.version) |
6437 | ipw2100_release_firmware(priv, &ipw2100_firmware); | 6434 | ipw2100_release_firmware(priv, &ipw2100_firmware); |
6438 | #endif | 6435 | #endif |
6439 | /* Take down the hardware */ | 6436 | /* Take down the hardware */ |
6440 | ipw2100_down(priv); | 6437 | ipw2100_down(priv); |
6441 | 6438 | ||
6442 | /* Release the mutex so that the network subsystem can | 6439 | /* Release the mutex so that the network subsystem can |
6443 | * complete any needed calls into the driver... */ | 6440 | * complete any needed calls into the driver... */ |
6444 | mutex_unlock(&priv->action_mutex); | 6441 | mutex_unlock(&priv->action_mutex); |
6445 | 6442 | ||
6446 | /* Unregister the device first - this results in close() | 6443 | /* Unregister the device first - this results in close() |
6447 | * being called if the device is open. If we free storage | 6444 | * being called if the device is open. If we free storage |
6448 | * first, then close() will crash. */ | 6445 | * first, then close() will crash. |
6449 | unregister_netdev(dev); | 6446 | * FIXME: remove the comment above. */ |
6447 | unregister_netdev(dev); | ||
6450 | 6448 | ||
6451 | ipw2100_kill_works(priv); | 6449 | ipw2100_kill_works(priv); |
6452 | 6450 | ||
6453 | ipw2100_queues_free(priv); | 6451 | ipw2100_queues_free(priv); |
6454 | 6452 | ||
6455 | /* Free potential debugging firmware snapshot */ | 6453 | /* Free potential debugging firmware snapshot */ |
6456 | ipw2100_snapshot_free(priv); | 6454 | ipw2100_snapshot_free(priv); |
6457 | 6455 | ||
6458 | if (dev->irq) | 6456 | free_irq(dev->irq, priv); |
6459 | free_irq(dev->irq, priv); | ||
6460 | 6457 | ||
6461 | pci_iounmap(pci_dev, priv->ioaddr); | 6458 | pci_iounmap(pci_dev, priv->ioaddr); |
6462 | 6459 | ||
6463 | /* wiphy_unregister needs to be here, before free_libipw */ | 6460 | /* wiphy_unregister needs to be here, before free_libipw */ |
6464 | wiphy_unregister(priv->ieee->wdev.wiphy); | 6461 | wiphy_unregister(priv->ieee->wdev.wiphy); |
6465 | kfree(priv->ieee->bg_band.channels); | 6462 | kfree(priv->ieee->bg_band.channels); |
6466 | free_libipw(dev, 0); | 6463 | free_libipw(dev, 0); |
6467 | } | ||
6468 | 6464 | ||
6469 | pci_release_regions(pci_dev); | 6465 | pci_release_regions(pci_dev); |
6470 | pci_disable_device(pci_dev); | 6466 | pci_disable_device(pci_dev); |