mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 06:33:07 +00:00
modules: only use mod->param_lock if CONFIG_MODULES
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
cf2fde7b39
commit
20bdc2cfdb
1 changed files with 4 additions and 0 deletions
|
@ -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 : ¶m_lock)
|
#define KPARAM_MUTEX(mod) ((mod) ? &(mod)->param_lock : ¶m_lock)
|
||||||
|
#else
|
||||||
|
#define KPARAM_MUTEX(mod) (¶m_lock)
|
||||||
|
#endif
|
||||||
|
|
||||||
static inline void check_kparam_locked(struct module *mod)
|
static inline void check_kparam_locked(struct module *mod)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue