/* atl2_remove is called by the PCI subsystem to alert the driver that it should release a PCI device. The could be caused by a Hot-Plug event, or because the driver is going to be removed from memory.  */
static void __devexit atl2_remove(struct pci_dev *pdev)
/* atl2_remove is called by the PCI subsystem to alert the driver that it should release a PCI device. The could be caused by a Hot-Plug event, or because the driver is going to be removed from memory.  */
static void __devexit atl2_remove(struct pci_dev *pdev)
{
	struct net_device *netdev = pci_get_drvdata(pdev);
	struct atl2_adapter *adapter = netdev_priv(netdev);
	set_bit(__ATL2_DOWN, &adapter->flags);
	del_timer_sync(&adapter->watchdog_timer);
	del_timer_sync(&adapter->phy_config_timer);
	flush_scheduled_work();
	unregister_netdev(netdev);
	atl2_force_ps(&adapter->hw);
	iounmap(adapter->hw.hw_addr);
	pci_release_regions(pdev);
	free_netdev(netdev);
	pci_disable_device(pdev);
}