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()
271 if (dev == ic->classdev.parent) in attribute_container_device_trigger()
272 fn(cont, dev, &ic->classdev); in attribute_container_device_trigger()
314 attribute_container_add_attrs(struct device *classdev) in attribute_container_add_attrs() argument
317 attribute_container_classdev_to_container(classdev); in attribute_container_add_attrs()
327 return sysfs_create_group(&classdev->kobj, cont->grp); in attribute_container_add_attrs()
331 error = device_create_file(classdev, attrs[i]); in attribute_container_add_attrs()
349 attribute_container_add_class_device(struct device *classdev) in attribute_container_add_class_device() argument
351 int error = device_add(classdev); in attribute_container_add_class_device()
355 return attribute_container_add_attrs(classdev); in attribute_container_add_class_device()
367 struct device *classdev) in attribute_container_add_class_device_adapter() argument
369 return attribute_container_add_class_device(classdev); in attribute_container_add_class_device_adapter()
379 attribute_container_remove_attrs(struct device *classdev) in attribute_container_remove_attrs() argument
382 attribute_container_classdev_to_container(classdev); in attribute_container_remove_attrs()
390 sysfs_remove_group(&classdev->kobj, cont->grp); in attribute_container_remove_attrs()
395 device_remove_file(classdev, attrs[i]); in attribute_container_remove_attrs()
407 attribute_container_class_device_del(struct device *classdev) in attribute_container_class_device_del() argument
409 attribute_container_remove_attrs(classdev); in attribute_container_class_device_del()
410 device_del(classdev); in attribute_container_class_device_del()
431 if (ic->classdev.parent == dev) { in attribute_container_find_class_device()
432 cdev = &ic->classdev; in attribute_container_find_class_device()