Commit e6eb8d81 authored by Javier Achirica's avatar Javier Achirica Committed by Jeff Garzik

[netdrvr airo] safer unload code

parent 38a65b4a
......@@ -1608,13 +1608,10 @@ static void del_airo_dev( struct net_device *dev );
void stop_airo_card( struct net_device *dev, int freeres )
{
struct airo_info *ai = dev->priv;
flush_scheduled_work();
disable_interrupts(ai);
free_irq( dev->irq, dev );
if (ai->flash)
kfree(ai->flash);
if (ai->rssi)
kfree(ai->rssi);
if (auto_wep)
del_timer_sync(&ai->timer);
takedown_proc_entry( dev, ai );
if (ai->registered) {
unregister_netdev( dev );
......@@ -1625,7 +1622,11 @@ void stop_airo_card( struct net_device *dev, int freeres )
}
ai->registered = 0;
}
if (auto_wep) del_timer_sync(&ai->timer);
flush_scheduled_work();
if (ai->flash)
kfree(ai->flash);
if (ai->rssi)
kfree(ai->rssi);
if (freeres) {
/* PCMCIA frees this stuff, so only for PCI and ISA */
release_region( dev->base_addr, 64 );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment