• Home
  • Raw
  • Download

Lines Matching refs:mp

636 	if (!mk->mp) {  in add_sysfs_param()
638 mk->mp = kzalloc(sizeof(*mk->mp), GFP_KERNEL); in add_sysfs_param()
639 if (!mk->mp) in add_sysfs_param()
641 mk->mp->grp.name = "parameters"; in add_sysfs_param()
643 mk->mp->grp.attrs = kzalloc(sizeof(mk->mp->grp.attrs[0]), in add_sysfs_param()
646 if (!mk->mp->grp.attrs) in add_sysfs_param()
651 new_mp = krealloc(mk->mp, in add_sysfs_param()
652 sizeof(*mk->mp) + in add_sysfs_param()
653 sizeof(mk->mp->attrs[0]) * (mk->mp->num + 1), in add_sysfs_param()
657 mk->mp = new_mp; in add_sysfs_param()
660 new_attrs = krealloc(mk->mp->grp.attrs, in add_sysfs_param()
661 sizeof(mk->mp->grp.attrs[0]) * (mk->mp->num + 2), in add_sysfs_param()
665 mk->mp->grp.attrs = new_attrs; in add_sysfs_param()
668 memset(&mk->mp->attrs[mk->mp->num], 0, sizeof(mk->mp->attrs[0])); in add_sysfs_param()
669 sysfs_attr_init(&mk->mp->attrs[mk->mp->num].mattr.attr); in add_sysfs_param()
670 mk->mp->attrs[mk->mp->num].param = kp; in add_sysfs_param()
671 mk->mp->attrs[mk->mp->num].mattr.show = param_attr_show; in add_sysfs_param()
674 mk->mp->attrs[mk->mp->num].mattr.store = param_attr_store; in add_sysfs_param()
676 mk->mp->attrs[mk->mp->num].mattr.store = NULL; in add_sysfs_param()
677 mk->mp->attrs[mk->mp->num].mattr.attr.name = (char *)name; in add_sysfs_param()
678 mk->mp->attrs[mk->mp->num].mattr.attr.mode = kp->perm; in add_sysfs_param()
679 mk->mp->num++; in add_sysfs_param()
682 for (i = 0; i < mk->mp->num; i++) in add_sysfs_param()
683 mk->mp->grp.attrs[i] = &mk->mp->attrs[i].mattr.attr; in add_sysfs_param()
684 mk->mp->grp.attrs[mk->mp->num] = NULL; in add_sysfs_param()
691 if (mk->mp) in free_module_param_attrs()
692 kfree(mk->mp->grp.attrs); in free_module_param_attrs()
693 kfree(mk->mp); in free_module_param_attrs()
694 mk->mp = NULL; in free_module_param_attrs()
728 err = sysfs_create_group(&mod->mkobj.kobj, &mod->mkobj.mp->grp); in module_param_sysfs_setup()
743 if (mod->mkobj.mp) { in module_param_sysfs_remove()
744 sysfs_remove_group(&mod->mkobj.kobj, &mod->mkobj.mp->grp); in module_param_sysfs_remove()
808 if (mk->mp) in kernel_add_sysfs_param()
809 sysfs_remove_group(&mk->kobj, &mk->mp->grp); in kernel_add_sysfs_param()
814 err = sysfs_create_group(&mk->kobj, &mk->mp->grp); in kernel_add_sysfs_param()