The driver keeps a bitmap of the netdevs it registered so it knows what to
unregister later. Remove that and look at reg_state instead.
Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
void __iomem *regs;
struct pci_dev *pdev;
struct device *pdev_dev;
- unsigned long registered_device_map;
unsigned int fn;
unsigned int flags;
err = register_netdev(adapter->port[i]);
if (err)
break;
- __set_bit(i, &adapter->registered_device_map);
adapter->chan_map[pi->tx_chan] = i;
print_port_info(adapter->port[i]);
}
detach_ulds(adapter);
for_each_port(adapter, i)
- if (test_bit(i, &adapter->registered_device_map))
+ if (adapter->port[i]->reg_state == NETREG_REGISTERED)
unregister_netdev(adapter->port[i]);
if (adapter->debugfs_root)