aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2015-01-19 21:53:00 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2015-01-19 21:53:00 +0000
commitd39d7c8636e4eb71d383a57db0e01e406ebe6528 (patch)
tree4a2ba752ee9bdeb68ad9ee9ab2ed91a0f01bd70b /sys
parent7c3892fc82a34e48c23b2b732392d3c6cfa23c2d (diff)
downloadsrc-d39d7c8636e4eb71d383a57db0e01e406ebe6528.tar.gz
src-d39d7c8636e4eb71d383a57db0e01e406ebe6528.zip
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/contrib/rdma/krping/krping.c2
-rw-r--r--sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c5
-rw-r--r--sys/dev/cxgbe/iw_cxgbe/device.c3
-rw-r--r--sys/ofed/drivers/infiniband/core/device.c2
-rw-r--r--sys/ofed/drivers/infiniband/hw/mlx4/main.c4
-rw-r--r--sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c4
-rw-r--r--sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c2
-rw-r--r--sys/ofed/drivers/net/mlx4/en_main.c4
-rw-r--r--sys/ofed/drivers/net/mlx4/main.c5
-rw-r--r--sys/ofed/include/linux/module.h8
10 files changed, 16 insertions, 23 deletions
diff --git a/sys/contrib/rdma/krping/krping.c b/sys/contrib/rdma/krping/krping.c
index a770423cfde8..c89339edf31b 100644
--- a/sys/contrib/rdma/krping/krping.c
+++ b/sys/contrib/rdma/krping/krping.c
@@ -60,6 +60,8 @@ extern int krping_debug;
MODULE_AUTHOR("Steve Wise");
MODULE_DESCRIPTION("RDMA ping client/server");
MODULE_LICENSE("Dual BSD/GPL");
+MODULE_VERSION(krping, 1);
+MODULE_DEPEND(krping, linuxapi, 1, 1, 1);
static __inline uint64_t
get_cycles(void)
diff --git a/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c b/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c
index 1825a430d040..18876fe4245b 100644
--- a/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c
+++ b/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c
@@ -251,9 +251,6 @@ iwch_mod_unload(void)
}
#endif /* TCP_OFFLOAD */
-#undef MODULE_VERSION
-#include <sys/module.h>
-
static int
iwch_modevent(module_t mod, int cmd, void *arg)
{
@@ -299,3 +296,5 @@ MODULE_DEPEND(t3_tom, cxgbc, 1, 1, 1);
MODULE_DEPEND(iw_cxgb, toecore, 1, 1, 1);
MODULE_DEPEND(iw_cxgb, t3_tom, 1, 1, 1);
MODULE_DEPEND(iw_cxgb, ibcore, 1, 1, 1);
+MODULE_DEPEND(iw_cxgb, linuxapi, 1, 1, 1);
+
diff --git a/sys/dev/cxgbe/iw_cxgbe/device.c b/sys/dev/cxgbe/iw_cxgbe/device.c
index adb283d8f719..92a574215b2a 100644
--- a/sys/dev/cxgbe/iw_cxgbe/device.c
+++ b/sys/dev/cxgbe/iw_cxgbe/device.c
@@ -321,8 +321,6 @@ c4iw_mod_unload(void)
}
#endif
-#undef MODULE_VERSION
-#include <sys/module.h>
/*
* t4_tom won't load on kernels without TCP_OFFLOAD and this module's dependency
@@ -366,4 +364,5 @@ MODULE_VERSION(iw_cxgbe, 1);
MODULE_DEPEND(iw_cxgbe, t4nex, 1, 1, 1);
MODULE_DEPEND(iw_cxgbe, t4_tom, 1, 1, 1);
MODULE_DEPEND(iw_cxgbe, ibcore, 1, 1, 1);
+MODULE_DEPEND(iw_cxgbe, linuxapi, 1, 1, 1);
DECLARE_MODULE(iw_cxgbe, c4iw_mod_data, SI_SUB_EXEC, SI_ORDER_ANY);
diff --git a/sys/ofed/drivers/infiniband/core/device.c b/sys/ofed/drivers/infiniband/core/device.c
index e2e6bafdf699..98adf489b81a 100644
--- a/sys/ofed/drivers/infiniband/core/device.c
+++ b/sys/ofed/drivers/infiniband/core/device.c
@@ -754,8 +754,6 @@ static void __exit ib_core_cleanup(void)
module_init(ib_core_init);
module_exit(ib_core_cleanup);
-#undef MODULE_VERSION
-#include <sys/module.h>
static int
ibcore_evhand(module_t mod, int event, void *arg)
{
diff --git a/sys/ofed/drivers/infiniband/hw/mlx4/main.c b/sys/ofed/drivers/infiniband/hw/mlx4/main.c
index 441ee739bb26..fd0b7235873a 100644
--- a/sys/ofed/drivers/infiniband/hw/mlx4/main.c
+++ b/sys/ofed/drivers/infiniband/hw/mlx4/main.c
@@ -67,7 +67,9 @@
MODULE_AUTHOR("Roland Dreier");
MODULE_DESCRIPTION("Mellanox ConnectX HCA InfiniBand driver");
MODULE_LICENSE("Dual BSD/GPL");
+#ifdef __linux__
MODULE_VERSION(DRV_VERSION);
+#endif
int mlx4_ib_sm_guid_assign = 1;
@@ -2404,8 +2406,6 @@ static void __exit mlx4_ib_cleanup(void)
module_init_order(mlx4_ib_init, SI_ORDER_MIDDLE);
module_exit(mlx4_ib_cleanup);
-#undef MODULE_VERSION
-#include <sys/module.h>
static int
mlx4ib_evhand(module_t mod, int event, void *arg)
{
diff --git a/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c b/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c
index d1da694f62a7..8596bdd3d7eb 100644
--- a/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c
+++ b/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c
@@ -47,7 +47,9 @@
MODULE_AUTHOR("Roland Dreier");
MODULE_DESCRIPTION("Mellanox InfiniBand HCA low-level driver");
MODULE_LICENSE("Dual BSD/GPL");
-MODULE_VERSION(DRV_VERSION);
+MODULE_VERSION(mthca, 1);
+MODULE_DEPEND(mthca, linuxapi, 1, 1, 1);
+MODULE_DEPEND(mthca, ibcore, 1, 1, 1);
#ifdef CONFIG_INFINIBAND_MTHCA_DEBUG
diff --git a/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c b/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c
index fe517389b65b..695621f16a84 100644
--- a/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -1527,8 +1527,6 @@ ipoib_resolvemulti(struct ifnet *ifp, struct sockaddr **llsa,
module_init(ipoib_init_module);
module_exit(ipoib_cleanup_module);
-#undef MODULE_VERSION
-#include <sys/module.h>
static int
ipoib_evhand(module_t mod, int event, void *arg)
{
diff --git a/sys/ofed/drivers/net/mlx4/en_main.c b/sys/ofed/drivers/net/mlx4/en_main.c
index 983f99e382c0..1249d62a4f92 100644
--- a/sys/ofed/drivers/net/mlx4/en_main.c
+++ b/sys/ofed/drivers/net/mlx4/en_main.c
@@ -45,7 +45,9 @@
MODULE_AUTHOR("Liran Liss, Yevgeny Petrilin");
MODULE_DESCRIPTION("Mellanox ConnectX HCA Ethernet driver");
MODULE_LICENSE("Dual BSD/GPL");
+#ifdef __linux__
MODULE_VERSION(DRV_VERSION " ("DRV_RELDATE")");
+#endif
static const char mlx4_en_version[] =
DRV_NAME ": Mellanox ConnectX HCA Ethernet driver v"
@@ -336,8 +338,6 @@ static void __exit mlx4_en_cleanup(void)
module_init(mlx4_en_init);
module_exit(mlx4_en_cleanup);
-#undef MODULE_VERSION
-#include <sys/module.h>
static int
mlxen_evhand(module_t mod, int event, void *arg)
{
diff --git a/sys/ofed/drivers/net/mlx4/main.c b/sys/ofed/drivers/net/mlx4/main.c
index 1b8f85fc2dc6..84c40eddf24b 100644
--- a/sys/ofed/drivers/net/mlx4/main.c
+++ b/sys/ofed/drivers/net/mlx4/main.c
@@ -34,10 +34,6 @@
*/
#include <linux/kmod.h>
-/*
- * kmod.h must be included before module.h since it includes (indirectly) sys/module.h
- * To use the FBSD macro sys/module.h should define MODULE_VERSION before linux/module does.
-*/
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/pci.h>
@@ -3783,7 +3779,6 @@ static void __exit mlx4_cleanup(void)
module_init_order(mlx4_init, SI_ORDER_MIDDLE);
module_exit(mlx4_cleanup);
-#include <sys/module.h>
static int
mlx4_evhand(module_t mod, int event, void *arg)
{
diff --git a/sys/ofed/include/linux/module.h b/sys/ofed/include/linux/module.h
index fbbc45219f8a..cd9f4d556079 100644
--- a/sys/ofed/include/linux/module.h
+++ b/sys/ofed/include/linux/module.h
@@ -29,6 +29,10 @@
#ifndef _LINUX_MODULE_H_
#define _LINUX_MODULE_H_
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <sys/module.h>
+
#include <linux/list.h>
#include <linux/compiler.h>
#include <linux/kobject.h>
@@ -39,10 +43,6 @@
#define MODULE_DESCRIPTION(name)
#define MODULE_LICENSE(name)
-#ifndef MODULE_VERSION
-#define MODULE_VERSION(name)
-#endif
-
#define THIS_MODULE ((struct module *)0)
#define EXPORT_SYMBOL(name)