diff options
author | Michael Chan <mchan@broadcom.com> | 2013-07-28 22:03:56 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-07-30 01:03:07 -0400 |
commit | b54345ea32ccd830066a793388a55473e05a4679 (patch) | |
tree | dd21e88b2b3654c6785f2cf6f28ca33a944a8812 | |
parent | 415fb87da80fa45a9cbe820cb2a86e70668688eb (diff) |
cnic: Simplify cnic_release().
Since unregister_netdevice_notifier() will replay the NETDEV_DOWN and
NETDEV_UNREGISTER_EVENTS, the cnic_dev_list will be cleaned up automatically.
The loop to cleanup the cnic_dev_list can be removed in cnic_release().
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/broadcom/cnic.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/net/ethernet/broadcom/cnic.c b/drivers/net/ethernet/broadcom/cnic.c index 764bfc158949..c6822e16c7a3 100644 --- a/drivers/net/ethernet/broadcom/cnic.c +++ b/drivers/net/ethernet/broadcom/cnic.c | |||
@@ -5693,21 +5693,8 @@ static struct notifier_block cnic_netdev_notifier = { | |||
5693 | 5693 | ||
5694 | static void cnic_release(void) | 5694 | static void cnic_release(void) |
5695 | { | 5695 | { |
5696 | struct cnic_dev *dev; | ||
5697 | struct cnic_uio_dev *udev; | 5696 | struct cnic_uio_dev *udev; |
5698 | 5697 | ||
5699 | while (!list_empty(&cnic_dev_list)) { | ||
5700 | dev = list_entry(cnic_dev_list.next, struct cnic_dev, list); | ||
5701 | if (test_bit(CNIC_F_CNIC_UP, &dev->flags)) { | ||
5702 | cnic_ulp_stop(dev); | ||
5703 | cnic_stop_hw(dev); | ||
5704 | } | ||
5705 | |||
5706 | cnic_ulp_exit(dev); | ||
5707 | cnic_unregister_netdev(dev); | ||
5708 | list_del_init(&dev->list); | ||
5709 | cnic_free_dev(dev); | ||
5710 | } | ||
5711 | while (!list_empty(&cnic_udev_list)) { | 5698 | while (!list_empty(&cnic_udev_list)) { |
5712 | udev = list_entry(cnic_udev_list.next, struct cnic_uio_dev, | 5699 | udev = list_entry(cnic_udev_list.next, struct cnic_uio_dev, |
5713 | list); | 5700 | list); |