summaryrefslogtreecommitdiff
path: root/drivers/infiniband/core/addr.c
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@mellanox.com>2016-05-19 17:12:31 +0300
committerDoug Ledford <dledford@redhat.com>2016-05-24 21:40:13 +0300
commite3f20f02864f6da1509c523bfa1e928619e59095 (patch)
treead2b79a9ba8c013cc11d0f1c78416d92edda5076 /drivers/infiniband/core/addr.c
parentc16d2750a08c8ccaf98d65f287a8aec91bb9610d (diff)
downloadlinux-e3f20f02864f6da1509c523bfa1e928619e59095.tar.xz
IB/core: Integrate IB address resolution module into core
IB address resolution is declared as a module (ib_addr.ko) which loads itself before IB core module (ib_core.ko). It causes to the scenario where IB netlink which is initialized by IB core can't be used by ib_addr.ko. In order to solve it, we are converting ib_addr.ko to be part of IB core module. Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Mark Bloch <markb@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/core/addr.c')
-rw-r--r--drivers/infiniband/core/addr.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c
index 337353d86cfa..3a203ee08ced 100644
--- a/drivers/infiniband/core/addr.c
+++ b/drivers/infiniband/core/addr.c
@@ -47,10 +47,6 @@
#include <rdma/ib_addr.h>
#include <rdma/ib.h>
-MODULE_AUTHOR("Sean Hefty");
-MODULE_DESCRIPTION("IB Address Translation");
-MODULE_LICENSE("Dual BSD/GPL");
-
struct addr_req {
struct list_head list;
struct sockaddr_storage src_addr;
@@ -634,7 +630,7 @@ static struct notifier_block nb = {
.notifier_call = netevent_callback
};
-static int __init addr_init(void)
+int addr_init(void)
{
addr_wq = create_singlethread_workqueue("ib_addr");
if (!addr_wq)
@@ -645,12 +641,9 @@ static int __init addr_init(void)
return 0;
}
-static void __exit addr_cleanup(void)
+void addr_cleanup(void)
{
rdma_addr_unregister_client(&self);
unregister_netevent_notifier(&nb);
destroy_workqueue(addr_wq);
}
-
-module_init(addr_init);
-module_exit(addr_cleanup);