summaryrefslogtreecommitdiff
path: root/drivers/net/cxgb4/cxgb4_main.c
diff options
context:
space:
mode:
authorDimitris Michailidis <dm@chelsio.com>2010-12-15 00:36:52 +0300
committerDavid S. Miller <davem@davemloft.net>2010-12-17 00:16:03 +0300
commit8f3a76769ee50a839282f70d07d5f3429524b68a (patch)
tree09f84034f51edeaf012eb15b237ec09122ce0c42 /drivers/net/cxgb4/cxgb4_main.c
parentb1a3c2b698ec333edc86bf8b5a636162ca309870 (diff)
downloadlinux-8f3a76769ee50a839282f70d07d5f3429524b68a.tar.xz
cxgb4: remove a bitmap
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>
Diffstat (limited to 'drivers/net/cxgb4/cxgb4_main.c')
-rw-r--r--drivers/net/cxgb4/cxgb4_main.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/cxgb4/cxgb4_main.c b/drivers/net/cxgb4/cxgb4_main.c
index 4d7565cf74ee..059c1eec8c3f 100644
--- a/drivers/net/cxgb4/cxgb4_main.c
+++ b/drivers/net/cxgb4/cxgb4_main.c
@@ -3725,7 +3725,6 @@ static int __devinit init_one(struct pci_dev *pdev,
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]);
}
@@ -3785,7 +3784,7 @@ static void __devexit remove_one(struct pci_dev *pdev)
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)