Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

modules: only use mod->param_lock if CONFIG_MODULES

parent cf2fde7b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -30,7 +30,11 @@
static DEFINE_MUTEX(param_lock);

/* 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)
#else
#define KPARAM_MUTEX(mod)	(&param_lock)
#endif

static inline void check_kparam_locked(struct module *mod)
{