diff options
author | Bhanu Gollapudi <bprakash@broadcom.com> | 2011-03-17 20:13:35 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2011-03-23 12:37:07 -0400 |
commit | c94460fd29a9893eb677d2e0831a247a185c7a22 (patch) | |
tree | 7be0e83eb8c8b5f4b3736ddf6252c54b6d1e6617 /drivers/scsi | |
parent | 1294bfe60960c89a0c875cffb90c3bacf1d675d2 (diff) |
[SCSI] bnx2fc: Remove unnecessary module state checks
The check for module state MODULE_STATE_LIVE is no longer required for LLDs, as
libfcoe transport takes care of it. Reference:
http://marc.info/?l=linux-scsi&m=129989565903046&w=2
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c index aab55e24cb7b..38a00fe10bd7 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c +++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c | |||
@@ -1395,12 +1395,6 @@ static int bnx2fc_destroy(struct net_device *netdev) | |||
1395 | rtnl_lock(); | 1395 | rtnl_lock(); |
1396 | 1396 | ||
1397 | mutex_lock(&bnx2fc_dev_lock); | 1397 | mutex_lock(&bnx2fc_dev_lock); |
1398 | #ifdef CONFIG_SCSI_BNX2X_FCOE_MODULE | ||
1399 | if (THIS_MODULE->state != MODULE_STATE_LIVE) { | ||
1400 | rc = -ENODEV; | ||
1401 | goto netdev_err; | ||
1402 | } | ||
1403 | #endif | ||
1404 | /* obtain physical netdev */ | 1398 | /* obtain physical netdev */ |
1405 | if (netdev->priv_flags & IFF_802_1Q_VLAN) | 1399 | if (netdev->priv_flags & IFF_802_1Q_VLAN) |
1406 | phys_dev = vlan_dev_real_dev(netdev); | 1400 | phys_dev = vlan_dev_real_dev(netdev); |
@@ -1768,11 +1762,6 @@ static int bnx2fc_disable(struct net_device *netdev) | |||
1768 | 1762 | ||
1769 | mutex_lock(&bnx2fc_dev_lock); | 1763 | mutex_lock(&bnx2fc_dev_lock); |
1770 | 1764 | ||
1771 | if (THIS_MODULE->state != MODULE_STATE_LIVE) { | ||
1772 | rc = -ENODEV; | ||
1773 | goto nodev; | ||
1774 | } | ||
1775 | |||
1776 | /* obtain physical netdev */ | 1765 | /* obtain physical netdev */ |
1777 | if (netdev->priv_flags & IFF_802_1Q_VLAN) | 1766 | if (netdev->priv_flags & IFF_802_1Q_VLAN) |
1778 | phys_dev = vlan_dev_real_dev(netdev); | 1767 | phys_dev = vlan_dev_real_dev(netdev); |
@@ -1828,11 +1817,6 @@ static int bnx2fc_enable(struct net_device *netdev) | |||
1828 | BNX2FC_MISC_DBG("Entered %s\n", __func__); | 1817 | BNX2FC_MISC_DBG("Entered %s\n", __func__); |
1829 | mutex_lock(&bnx2fc_dev_lock); | 1818 | mutex_lock(&bnx2fc_dev_lock); |
1830 | 1819 | ||
1831 | if (THIS_MODULE->state != MODULE_STATE_LIVE) { | ||
1832 | rc = -ENODEV; | ||
1833 | goto nodev; | ||
1834 | } | ||
1835 | |||
1836 | /* obtain physical netdev */ | 1820 | /* obtain physical netdev */ |
1837 | if (netdev->priv_flags & IFF_802_1Q_VLAN) | 1821 | if (netdev->priv_flags & IFF_802_1Q_VLAN) |
1838 | phys_dev = vlan_dev_real_dev(netdev); | 1822 | phys_dev = vlan_dev_real_dev(netdev); |
@@ -1899,13 +1883,6 @@ static int bnx2fc_create(struct net_device *netdev, enum fip_state fip_mode) | |||
1899 | 1883 | ||
1900 | mutex_lock(&bnx2fc_dev_lock); | 1884 | mutex_lock(&bnx2fc_dev_lock); |
1901 | 1885 | ||
1902 | #ifdef CONFIG_SCSI_BNX2X_FCOE_MODULE | ||
1903 | if (THIS_MODULE->state != MODULE_STATE_LIVE) { | ||
1904 | rc = -ENODEV; | ||
1905 | goto mod_err; | ||
1906 | } | ||
1907 | #endif | ||
1908 | |||
1909 | if (!try_module_get(THIS_MODULE)) { | 1886 | if (!try_module_get(THIS_MODULE)) { |
1910 | rc = -EINVAL; | 1887 | rc = -EINVAL; |
1911 | goto mod_err; | 1888 | goto mod_err; |