IB/SA: Integrate ib_sa module into ib_core module
Consolidate ib_sa into ib_core, this commit eliminates
ib_sa.ko and makes it part of ib_core.ko
Signed-off-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
index f80549f..2cd0956 100644
--- a/drivers/infiniband/core/device.c
+++ b/drivers/infiniband/core/device.c
@@ -995,10 +995,18 @@
goto err_addr;
}
+ ret = ib_sa_init();
+ if (ret) {
+ pr_warn("Couldn't init SA\n");
+ goto err_mad;
+ }
+
ib_cache_setup();
return 0;
+err_mad:
+ ib_mad_cleanup();
err_addr:
addr_cleanup();
err_ibnl:
@@ -1015,6 +1023,7 @@
static void __exit ib_core_cleanup(void)
{
ib_cache_cleanup();
+ ib_sa_cleanup();
ib_mad_cleanup();
addr_cleanup();
ibnl_cleanup();