Lines Matching refs:kobj
21 static ssize_t format_show(struct kobject *kobj, struct kobj_attribute *attr, in format_show() argument
38 static ssize_t size_show(struct kobject *kobj, struct kobj_attribute *attr, in size_show() argument
44 rc = secvar_ops->get(kobj->name, strlen(kobj->name) + 1, NULL, &dsize); in size_show()
47 pr_err("Error retrieving %s variable size %d\n", kobj->name, rc); in size_show()
54 static ssize_t data_read(struct file *filep, struct kobject *kobj, in data_read() argument
62 rc = secvar_ops->get(kobj->name, strlen(kobj->name) + 1, NULL, &dsize); in data_read()
65 pr_err("Error getting %s variable size %d\n", kobj->name, rc); in data_read()
74 rc = secvar_ops->get(kobj->name, strlen(kobj->name) + 1, data, &dsize); in data_read()
76 pr_err("Error getting %s variable %d\n", kobj->name, rc); in data_read()
87 static ssize_t update_write(struct file *filep, struct kobject *kobj, in update_write() argument
94 rc = secvar_ops->set(kobj->name, strlen(kobj->name) + 1, buf, count); in update_write()
96 pr_err("Error setting the %s variable %d\n", kobj->name, rc); in update_write()
148 static int secvar_sysfs_config(struct kobject *kobj) in secvar_sysfs_config() argument
156 return sysfs_create_group(kobj, &config_group); in secvar_sysfs_config()
163 struct kobject *kobj; in add_var() local
166 kobj = kzalloc(sizeof(*kobj), GFP_KERNEL); in add_var()
167 if (!kobj) in add_var()
170 kobject_init(kobj, &secvar_ktype); in add_var()
172 rc = kobject_add(kobj, &secvar_kset->kobj, "%s", name); in add_var()
176 kobject_put(kobj); in add_var()
180 kobject_uevent(kobj, KOBJ_ADD); in add_var()