Lines Matching refs:parent
92 return sysfs_emit(buf, "%s\n", mtype->parent->mdev_driver->device_api); in device_api_show()
109 struct mdev_driver *drv = mtype->parent->mdev_driver; in available_instances_show()
114 atomic_read(&mtype->parent->available_instances)); in available_instances_show()
122 return mtype->parent->mdev_driver->show_description(mtype, buf); in description_show()
139 !to_mdev_type(kobj)->parent->mdev_driver->show_description) in mdev_types_core_is_visible()
160 put_device(type->parent->dev); in mdev_type_release()
169 static int mdev_type_add(struct mdev_parent *parent, struct mdev_type *type) in mdev_type_add() argument
173 type->kobj.kset = parent->mdev_types_kset; in mdev_type_add()
174 type->parent = parent; in mdev_type_add()
176 get_device(parent->dev); in mdev_type_add()
179 "%s-%s", dev_driver_string(parent->dev), in mdev_type_add()
208 void parent_remove_sysfs_files(struct mdev_parent *parent) in parent_remove_sysfs_files() argument
212 for (i = 0; i < parent->nr_types; i++) in parent_remove_sysfs_files()
213 mdev_type_remove(parent->types[i]); in parent_remove_sysfs_files()
214 kset_unregister(parent->mdev_types_kset); in parent_remove_sysfs_files()
217 int parent_create_sysfs_files(struct mdev_parent *parent) in parent_create_sysfs_files() argument
221 parent->mdev_types_kset = kset_create_and_add("mdev_supported_types", in parent_create_sysfs_files()
222 NULL, &parent->dev->kobj); in parent_create_sysfs_files()
223 if (!parent->mdev_types_kset) in parent_create_sysfs_files()
226 for (i = 0; i < parent->nr_types; i++) { in parent_create_sysfs_files()
227 ret = mdev_type_add(parent, parent->types[i]); in parent_create_sysfs_files()
235 mdev_type_remove(parent->types[i]); in parent_create_sysfs_files()
236 kset_unregister(parent->mdev_types_kset); in parent_create_sysfs_files()