• Home
  • Raw
  • Download

Lines Matching refs:parent

29 		ret = attr->show(kobj, type->parent->dev, buf);  in mdev_type_attr_show()
42 ret = attr->store(&type->kobj, type->parent->dev, buf, count); in mdev_type_attr_store()
92 static struct mdev_type *add_mdev_supported_type(struct mdev_parent *parent, in add_mdev_supported_type() argument
107 type->kobj.kset = parent->mdev_types_kset; in add_mdev_supported_type()
108 type->parent = parent; in add_mdev_supported_type()
111 "%s-%s", dev_driver_string(parent->dev), in add_mdev_supported_type()
158 static int add_mdev_supported_type_groups(struct mdev_parent *parent) in add_mdev_supported_type_groups() argument
162 for (i = 0; parent->ops->supported_type_groups[i]; i++) { in add_mdev_supported_type_groups()
165 type = add_mdev_supported_type(parent, in add_mdev_supported_type_groups()
166 parent->ops->supported_type_groups[i]); in add_mdev_supported_type_groups()
170 list_for_each_entry_safe(ltype, tmp, &parent->type_list, in add_mdev_supported_type_groups()
177 list_add(&type->next, &parent->type_list); in add_mdev_supported_type_groups()
183 void parent_remove_sysfs_files(struct mdev_parent *parent) in parent_remove_sysfs_files() argument
187 list_for_each_entry_safe(type, tmp, &parent->type_list, next) { in parent_remove_sysfs_files()
192 sysfs_remove_groups(&parent->dev->kobj, parent->ops->dev_attr_groups); in parent_remove_sysfs_files()
193 kset_unregister(parent->mdev_types_kset); in parent_remove_sysfs_files()
196 int parent_create_sysfs_files(struct mdev_parent *parent) in parent_create_sysfs_files() argument
200 parent->mdev_types_kset = kset_create_and_add("mdev_supported_types", in parent_create_sysfs_files()
201 NULL, &parent->dev->kobj); in parent_create_sysfs_files()
203 if (!parent->mdev_types_kset) in parent_create_sysfs_files()
206 INIT_LIST_HEAD(&parent->type_list); in parent_create_sysfs_files()
208 ret = sysfs_create_groups(&parent->dev->kobj, in parent_create_sysfs_files()
209 parent->ops->dev_attr_groups); in parent_create_sysfs_files()
213 ret = add_mdev_supported_type_groups(parent); in parent_create_sysfs_files()
215 sysfs_remove_groups(&parent->dev->kobj, in parent_create_sysfs_files()
216 parent->ops->dev_attr_groups); in parent_create_sysfs_files()
221 kset_unregister(parent->mdev_types_kset); in parent_create_sysfs_files()