Unified · Split
| @@ -30,7 +30,11 @@ · 29 unmodified lines | |||
| 30 | static DEFINE_MUTEX(param_lock); | 30 | static DEFINE_MUTEX(param_lock); |
| 31 | 31 | ||
| 32 | /* Use the module's mutex, or if built-in use the built-in mutex */ | 32 | /* Use the module's mutex, or if built-in use the built-in mutex */ |
| 33 | #ifdef CONFIG_MODULES | ||
| 33 | #define KPARAM_MUTEX(mod) ((mod) ? &(mod)->param_lock : ¶m_lock) | 34 | #define KPARAM_MUTEX(mod) ((mod) ? &(mod)->param_lock : ¶m_lock) |
| 35 | #else | ||
| 36 | #define KPARAM_MUTEX(mod) (¶m_lock) | ||
| 37 | #endif | ||
| 34 | 38 | ||
| 35 | static inline void check_kparam_locked(struct module *mod) | 39 | static inline void check_kparam_locked(struct module *mod) |
| 36 | { | 40 | { |