linuxkpi: Implement module_*() APIs as static functions
This fixes an "unused variable" warning when building DRM drivers. Reviewed by: emaste MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56780
This commit is contained in:
@@ -136,9 +136,14 @@ _module_run(void *arg)
|
||||
#define module_exit_order(fn, order) \
|
||||
SYSUNINIT(fn, SI_SUB_OFED_MODINIT, (order), _module_run, (fn))
|
||||
|
||||
#define module_get(module)
|
||||
#define module_put(module)
|
||||
#define try_module_get(module) 1
|
||||
static inline void module_get(struct module *module) {}
|
||||
static inline void module_put(struct module *module) {}
|
||||
|
||||
static inline bool
|
||||
try_module_get(struct module *module)
|
||||
{
|
||||
return (true);
|
||||
}
|
||||
|
||||
#define postcore_initcall(fn) module_init(fn)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user