Commit 20bdc2cf authored by Stephen Rothwell's avatar Stephen Rothwell Committed by Rusty Russell

modules: only use mod->param_lock if CONFIG_MODULES

Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent cf2fde7b
...@@ -30,7 +30,11 @@ ...@@ -30,7 +30,11 @@
static DEFINE_MUTEX(param_lock); static DEFINE_MUTEX(param_lock);
/* Use the module's mutex, or if built-in use the built-in mutex */ /* Use the module's mutex, or if built-in use the built-in mutex */
#ifdef CONFIG_MODULES
#define KPARAM_MUTEX(mod) ((mod) ? &(mod)->param_lock : &param_lock) #define KPARAM_MUTEX(mod) ((mod) ? &(mod)->param_lock : &param_lock)
#else
#define KPARAM_MUTEX(mod) (&param_lock)
#endif
static inline void check_kparam_locked(struct module *mod) static inline void check_kparam_locked(struct module *mod)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment