summaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_transport.c
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@linux-iscsi.org>2011-10-22 01:03:54 -0700
committerNicholas Bellinger <nab@linux-iscsi.org>2011-10-24 03:21:54 +0000
commitdbc5623eb2898f5b5dcdc0b16077bb3f58629c78 (patch)
treef69f4cba91f373a40bcfbbfca8b5383ee297320e /drivers/target/target_core_transport.c
parent35e0e757537b9239172e35db773dd062727fd612 (diff)
downloadop-kernel-dev-dbc5623eb2898f5b5dcdc0b16077bb3f58629c78.zip
op-kernel-dev-dbc5623eb2898f5b5dcdc0b16077bb3f58629c78.tar.gz
target: transport_subsystem_check_init cleanups
Remove the now unnecessary extra call to transport_subsystem_check_init() in target_core_register_fabric(), and also merge transport_subsystem_reqmods() directly into transport_subsystem_check_init(). Reported-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_transport.c')
-rw-r--r--drivers/target/target_core_transport.c23
1 files changed, 5 insertions, 18 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index 774ff00..06305be 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -234,10 +234,13 @@ void transport_init_queue_obj(struct se_queue_obj *qobj)
}
EXPORT_SYMBOL(transport_init_queue_obj);
-static int transport_subsystem_reqmods(void)
+void transport_subsystem_check_init(void)
{
int ret;
+ if (sub_api_initialized)
+ return;
+
ret = request_module("target_core_iblock");
if (ret != 0)
pr_err("Unable to load target_core_iblock\n");
@@ -254,24 +257,8 @@ static int transport_subsystem_reqmods(void)
if (ret != 0)
pr_err("Unable to load target_core_stgt\n");
- return 0;
-}
-
-int transport_subsystem_check_init(void)
-{
- int ret;
-
- if (sub_api_initialized)
- return 0;
- /*
- * Request the loading of known TCM subsystem plugins..
- */
- ret = transport_subsystem_reqmods();
- if (ret < 0)
- return ret;
-
sub_api_initialized = 1;
- return 0;
+ return;
}
struct se_session *transport_init_session(void)
OpenPOWER on IntegriCloud