Linux 4.11-rc6
[linux/fpc-iii.git] / net / sunrpc / xprtrdma / module.c
blob560712bd9fa2c66680bfbcdd04bf7eab50496a77
1 /*
2 * Copyright (c) 2015 Oracle. All rights reserved.
3 */
5 /* rpcrdma.ko module initialization
6 */
8 #include <linux/module.h>
9 #include <linux/init.h>
10 #include <linux/sunrpc/svc_rdma.h>
11 #include "xprt_rdma.h"
13 #if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
14 # define RPCDBG_FACILITY RPCDBG_TRANS
15 #endif
17 MODULE_AUTHOR("Open Grid Computing and Network Appliance, Inc.");
18 MODULE_DESCRIPTION("RPC/RDMA Transport");
19 MODULE_LICENSE("Dual BSD/GPL");
20 MODULE_ALIAS("svcrdma");
21 MODULE_ALIAS("xprtrdma");
23 static void __exit rpc_rdma_cleanup(void)
25 xprt_rdma_cleanup();
26 svc_rdma_cleanup();
29 static int __init rpc_rdma_init(void)
31 int rc;
33 rc = svc_rdma_init();
34 if (rc)
35 goto out;
37 rc = xprt_rdma_init();
38 if (rc)
39 svc_rdma_cleanup();
41 out:
42 return rc;
45 module_init(rpc_rdma_init);
46 module_exit(rpc_rdma_cleanup);