• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6.36/drivers/base/

Lines Matching defs:classdev

25 /* This is a private structure used to tie the classdev and the
30 struct device classdev;
37 get_device(&ic->classdev);
44 put_device(&ic->classdev);
49 * attribute_container_classdev_to_container - given a classdev, return the container
51 * @classdev: the class device created by attribute_container_add_device.
53 * Returns the container associated with this classdev.
56 attribute_container_classdev_to_container(struct device *classdev)
59 container_of(classdev, struct internal_container, classdev);
113 static void attribute_container_release(struct device *classdev)
116 = container_of(classdev, struct internal_container, classdev);
117 struct device *dev = classdev->parent;
134 * might be necessary is to allocate and initialise the classdev and
139 * which is not relinquished until the release of the classdev.
166 device_initialize(&ic->classdev);
167 ic->classdev.parent = get_device(dev);
168 ic->classdev.class = cont->class;
170 dev_set_name(&ic->classdev, dev_name(dev));
172 fn(cont, dev, &ic->classdev);
174 attribute_container_add_class_device(&ic->classdev);
196 * still has a reference to the classdev, then the memory occupied
197 * will not be freed until the classdev is released). If you want a
201 * to do the final put on the classdev.
223 if (dev != ic->classdev.parent)
227 fn(cont, dev, &ic->classdev);
229 attribute_container_remove_attrs(&ic->classdev);
230 device_unregister(&ic->classdev);
238 * attribute_container_device_trigger - execute a trigger for each matching classdev
241 * @fn the function to execute for each classdev.
244 * the container and the classdev. If you only care about the
269 if (dev == ic->classdev.parent)
270 fn(cont, dev, &ic->classdev);
283 * matching containers (not the classdev) associated with a device.
286 * actually needs to know the classdev.
306 * @classdev: The class device
312 attribute_container_add_attrs(struct device *classdev)
315 attribute_container_classdev_to_container(classdev);
325 return sysfs_create_group(&classdev->kobj, cont->grp);
329 error = device_create_file(classdev, attrs[i]);
340 * @classdev: the class device to add
343 * attribute containers, namely add the classdev to the system and then
347 attribute_container_add_class_device(struct device *classdev)
349 int error = device_add(classdev);
352 return attribute_container_add_attrs(classdev);
364 struct device *classdev)
366 return attribute_container_add_class_device(classdev);
372 * @classdev: The class device to remove the files from
376 attribute_container_remove_attrs(struct device *classdev)
379 attribute_container_classdev_to_container(classdev);
387 sysfs_remove_group(&classdev->kobj, cont->grp);
392 device_remove_file(classdev, attrs[i]);
398 * @classdev: the class device
404 attribute_container_class_device_del(struct device *classdev)
406 attribute_container_remove_attrs(classdev);
407 device_del(classdev);
428 if (ic->classdev.parent == dev) {
429 cdev = &ic->classdev;