Lines Matching refs:mod
24 #define KPARAM_MUTEX(mod) ((mod) ? &(mod)->param_lock : ¶m_lock) argument
26 #define KPARAM_MUTEX(mod) (¶m_lock) argument
29 static inline void check_kparam_locked(struct module *mod) in check_kparam_locked() argument
31 BUG_ON(!mutex_is_locked(KPARAM_MUTEX(mod))); in check_kparam_locked()
34 static inline void check_kparam_locked(struct module *mod) in check_kparam_locked() argument
142 kernel_param_lock(params[i].mod); in parse_one()
147 kernel_param_unlock(params[i].mod); in parse_one()
414 static int param_array(struct module *mod, in param_array() argument
446 check_kparam_locked(mod); in param_array()
468 return param_array(kp->mod, kp->name, val, 1, arr->max, arr->elem, in param_array_set()
484 check_kparam_locked(p.mod); in param_array_get()
567 kernel_param_lock(mk->mod); in param_attr_show()
569 kernel_param_unlock(mk->mod); in param_attr_show()
584 kernel_param_lock(mk->mod); in param_attr_store()
589 kernel_param_unlock(mk->mod); in param_attr_store()
603 void kernel_param_lock(struct module *mod) in kernel_param_lock() argument
605 mutex_lock(KPARAM_MUTEX(mod)); in kernel_param_lock()
608 void kernel_param_unlock(struct module *mod) in kernel_param_unlock() argument
610 mutex_unlock(KPARAM_MUTEX(mod)); in kernel_param_unlock()
707 int module_param_sysfs_setup(struct module *mod, in module_param_sysfs_setup() argument
717 err = add_sysfs_param(&mod->mkobj, &kparam[i], kparam[i].name); in module_param_sysfs_setup()
719 free_module_param_attrs(&mod->mkobj); in module_param_sysfs_setup()
729 err = sysfs_create_group(&mod->mkobj.kobj, &mod->mkobj.mp->grp); in module_param_sysfs_setup()
731 free_module_param_attrs(&mod->mkobj); in module_param_sysfs_setup()
742 void module_param_sysfs_remove(struct module *mod) in module_param_sysfs_remove() argument
744 if (mod->mkobj.mp) { in module_param_sysfs_remove()
745 sysfs_remove_group(&mod->mkobj.kobj, &mod->mkobj.mp->grp); in module_param_sysfs_remove()
748 free_module_param_attrs(&mod->mkobj); in module_param_sysfs_remove()
775 mk->mod = THIS_MODULE; in locate_module_kobject()