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>
This commit is contained in:
parent
b1a3c2b698
commit
8f3a76769e
2 changed files with 1 additions and 3 deletions
|
@ -482,7 +482,6 @@ struct adapter {
|
||||||
void __iomem *regs;
|
void __iomem *regs;
|
||||||
struct pci_dev *pdev;
|
struct pci_dev *pdev;
|
||||||
struct device *pdev_dev;
|
struct device *pdev_dev;
|
||||||
unsigned long registered_device_map;
|
|
||||||
unsigned int fn;
|
unsigned int fn;
|
||||||
unsigned int flags;
|
unsigned int flags;
|
||||||
|
|
||||||
|
|
|
@ -3725,7 +3725,6 @@ static int __devinit init_one(struct pci_dev *pdev,
|
||||||
err = register_netdev(adapter->port[i]);
|
err = register_netdev(adapter->port[i]);
|
||||||
if (err)
|
if (err)
|
||||||
break;
|
break;
|
||||||
__set_bit(i, &adapter->registered_device_map);
|
|
||||||
adapter->chan_map[pi->tx_chan] = i;
|
adapter->chan_map[pi->tx_chan] = i;
|
||||||
print_port_info(adapter->port[i]);
|
print_port_info(adapter->port[i]);
|
||||||
}
|
}
|
||||||
|
@ -3785,7 +3784,7 @@ static void __devexit remove_one(struct pci_dev *pdev)
|
||||||
detach_ulds(adapter);
|
detach_ulds(adapter);
|
||||||
|
|
||||||
for_each_port(adapter, i)
|
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]);
|
unregister_netdev(adapter->port[i]);
|
||||||
|
|
||||||
if (adapter->debugfs_root)
|
if (adapter->debugfs_root)
|
||||||
|
|
Loading…
Reference in a new issue