Lines Matching refs:classdev

28 	struct device classdev;  member
35 get_device(&ic->classdev); in internal_container_klist_get()
42 put_device(&ic->classdev); in internal_container_klist_put()
54 attribute_container_classdev_to_container(struct device *classdev) in attribute_container_classdev_to_container() argument
57 container_of(classdev, struct internal_container, classdev); in attribute_container_classdev_to_container()
112 static void attribute_container_release(struct device *classdev) in attribute_container_release() argument
115 = container_of(classdev, struct internal_container, classdev); in attribute_container_release()
116 struct device *dev = classdev->parent; in attribute_container_release()
165 device_initialize(&ic->classdev); in attribute_container_add_device()
166 ic->classdev.parent = get_device(dev); in attribute_container_add_device()
167 ic->classdev.class = cont->class; in attribute_container_add_device()
169 dev_set_name(&ic->classdev, "%s", dev_name(dev)); in attribute_container_add_device()
171 fn(cont, dev, &ic->classdev); in attribute_container_add_device()
173 attribute_container_add_class_device(&ic->classdev); in attribute_container_add_device()
225 if (dev != ic->classdev.parent) in attribute_container_remove_device()
229 fn(cont, dev, &ic->classdev); in attribute_container_remove_device()
231 attribute_container_remove_attrs(&ic->classdev); in attribute_container_remove_device()
232 device_unregister(&ic->classdev); in attribute_container_remove_device()
255 if (dev == ic->classdev.parent) { in do_attribute_container_device_trigger_safe()
256 ret = fn(cont, dev, &ic->classdev); in do_attribute_container_device_trigger_safe()
276 if (dev == ic->classdev.parent) in do_attribute_container_device_trigger_safe()
277 undo(cont, dev, &ic->classdev); in do_attribute_container_device_trigger_safe()
374 if (dev == ic->classdev.parent) in attribute_container_device_trigger()
375 fn(cont, dev, &ic->classdev); in attribute_container_device_trigger()
417 attribute_container_add_attrs(struct device *classdev) in attribute_container_add_attrs() argument
420 attribute_container_classdev_to_container(classdev); in attribute_container_add_attrs()
430 return sysfs_create_group(&classdev->kobj, cont->grp); in attribute_container_add_attrs()
434 error = device_create_file(classdev, attrs[i]); in attribute_container_add_attrs()
452 attribute_container_add_class_device(struct device *classdev) in attribute_container_add_class_device() argument
454 int error = device_add(classdev); in attribute_container_add_class_device()
458 return attribute_container_add_attrs(classdev); in attribute_container_add_class_device()
474 struct device *classdev) in attribute_container_add_class_device_adapter() argument
476 return attribute_container_add_class_device(classdev); in attribute_container_add_class_device_adapter()
486 attribute_container_remove_attrs(struct device *classdev) in attribute_container_remove_attrs() argument
489 attribute_container_classdev_to_container(classdev); in attribute_container_remove_attrs()
497 sysfs_remove_group(&classdev->kobj, cont->grp); in attribute_container_remove_attrs()
502 device_remove_file(classdev, attrs[i]); in attribute_container_remove_attrs()
514 attribute_container_class_device_del(struct device *classdev) in attribute_container_class_device_del() argument
516 attribute_container_remove_attrs(classdev); in attribute_container_class_device_del()
517 device_del(classdev); in attribute_container_class_device_del()
538 if (ic->classdev.parent == dev) { in attribute_container_find_class_device()
539 cdev = &ic->classdev; in attribute_container_find_class_device()