Add missing linuxapi module dependencies and always use the FreeBSD
"MODULE_VERSION" macro definition. Remove the redefinition of the "MODULE_VERSION" macro from the Linux kernel compatibility API. MFC after: 1 month Reported by: np@ Sponsored by: Mellanox Technologies
This commit is contained in:
parent
7c3892fc82
commit
d39d7c8636
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=277402
@ -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)
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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
|
||||
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user