• Home
  • Raw
  • Download

Lines Matching refs:kobj

21 static ssize_t mdev_type_attr_show(struct kobject *kobj,  in mdev_type_attr_show()  argument
25 struct mdev_type *type = to_mdev_type(kobj); in mdev_type_attr_show()
29 ret = attr->show(kobj, type->parent->dev, buf); in mdev_type_attr_show()
33 static ssize_t mdev_type_attr_store(struct kobject *kobj, in mdev_type_attr_store() argument
38 struct mdev_type *type = to_mdev_type(kobj); in mdev_type_attr_store()
42 ret = attr->store(&type->kobj, type->parent->dev, buf, count); in mdev_type_attr_store()
51 static ssize_t create_store(struct kobject *kobj, struct device *dev, in create_store() argument
70 ret = mdev_device_create(kobj, dev, &uuid); in create_store()
79 static void mdev_type_release(struct kobject *kobj) in mdev_type_release() argument
81 struct mdev_type *type = to_mdev_type(kobj); in mdev_type_release()
83 pr_debug("Releasing group %s\n", kobj->name); in mdev_type_release()
107 type->kobj.kset = parent->mdev_types_kset; in add_mdev_supported_type()
110 ret = kobject_init_and_add(&type->kobj, &mdev_type_ktype, NULL, in add_mdev_supported_type()
114 kobject_put(&type->kobj); in add_mdev_supported_type()
118 ret = sysfs_create_file(&type->kobj, &mdev_type_attr_create.attr); in add_mdev_supported_type()
122 type->devices_kobj = kobject_create_and_add("devices", &type->kobj); in add_mdev_supported_type()
128 ret = sysfs_create_files(&type->kobj, in add_mdev_supported_type()
141 sysfs_remove_file(&type->kobj, &mdev_type_attr_create.attr); in add_mdev_supported_type()
143 kobject_del(&type->kobj); in add_mdev_supported_type()
144 kobject_put(&type->kobj); in add_mdev_supported_type()
150 sysfs_remove_files(&type->kobj, in remove_mdev_supported_type()
153 sysfs_remove_file(&type->kobj, &mdev_type_attr_create.attr); in remove_mdev_supported_type()
154 kobject_del(&type->kobj); in remove_mdev_supported_type()
155 kobject_put(&type->kobj); in remove_mdev_supported_type()
192 sysfs_remove_groups(&parent->dev->kobj, parent->ops->dev_attr_groups); in parent_remove_sysfs_files()
201 NULL, &parent->dev->kobj); in parent_create_sysfs_files()
208 ret = sysfs_create_groups(&parent->dev->kobj, in parent_create_sysfs_files()
215 sysfs_remove_groups(&parent->dev->kobj, in parent_create_sysfs_files()
255 ret = sysfs_create_link(type->devices_kobj, &dev->kobj, dev_name(dev)); in mdev_create_sysfs_files()
259 ret = sysfs_create_link(&dev->kobj, &type->kobj, "mdev_type"); in mdev_create_sysfs_files()
263 ret = sysfs_create_files(&dev->kobj, mdev_device_attrs); in mdev_create_sysfs_files()
270 sysfs_remove_link(&dev->kobj, "mdev_type"); in mdev_create_sysfs_files()
278 sysfs_remove_files(&dev->kobj, mdev_device_attrs); in mdev_remove_sysfs_files()
279 sysfs_remove_link(&dev->kobj, "mdev_type"); in mdev_remove_sysfs_files()