Lines Matching refs:mod
23 #define KPARAM_MUTEX(mod) ((mod) ? &(mod)->param_lock : ¶m_lock) argument
25 #define KPARAM_MUTEX(mod) (¶m_lock) argument
28 static inline void check_kparam_locked(struct module *mod) in check_kparam_locked() argument
30 BUG_ON(!mutex_is_locked(KPARAM_MUTEX(mod))); in check_kparam_locked()
33 static inline void check_kparam_locked(struct module *mod) in check_kparam_locked() argument
141 kernel_param_lock(params[i].mod); in parse_one()
146 kernel_param_unlock(params[i].mod); in parse_one()
394 static int param_array(struct module *mod, in param_array() argument
426 check_kparam_locked(mod); in param_array()
448 return param_array(kp->mod, kp->name, val, 1, arr->max, arr->elem, in param_array_set()
464 check_kparam_locked(p.mod); in param_array_get()
547 kernel_param_lock(mk->mod); in param_attr_show()
549 kernel_param_unlock(mk->mod); in param_attr_show()
564 kernel_param_lock(mk->mod); in param_attr_store()
569 kernel_param_unlock(mk->mod); in param_attr_store()
583 void kernel_param_lock(struct module *mod) in kernel_param_lock() argument
585 mutex_lock(KPARAM_MUTEX(mod)); in kernel_param_lock()
588 void kernel_param_unlock(struct module *mod) in kernel_param_unlock() argument
590 mutex_unlock(KPARAM_MUTEX(mod)); in kernel_param_unlock()
687 int module_param_sysfs_setup(struct module *mod, in module_param_sysfs_setup() argument
697 err = add_sysfs_param(&mod->mkobj, &kparam[i], kparam[i].name); in module_param_sysfs_setup()
699 free_module_param_attrs(&mod->mkobj); in module_param_sysfs_setup()
709 err = sysfs_create_group(&mod->mkobj.kobj, &mod->mkobj.mp->grp); in module_param_sysfs_setup()
711 free_module_param_attrs(&mod->mkobj); in module_param_sysfs_setup()
722 void module_param_sysfs_remove(struct module *mod) in module_param_sysfs_remove() argument
724 if (mod->mkobj.mp) { in module_param_sysfs_remove()
725 sysfs_remove_group(&mod->mkobj.kobj, &mod->mkobj.mp->grp); in module_param_sysfs_remove()
728 free_module_param_attrs(&mod->mkobj); in module_param_sysfs_remove()
755 mk->mod = THIS_MODULE; in locate_module_kobject()