void attribute_container_add_device (struct device * dev, int (*fn) struct attribute_container *, struct device *, struct class_device *);
This function allocates storage for the class device(s) to be attached to dev (one for each matching attribute_container). If no fn is provided, the code will simply register the class device via class_device_add. If a function is provided, it is expected to add the class device at the appropriate time. One of the things that might be necessary is to allocate and initialise the classdev and then add it a later time. To do this, call this routine for allocation and initialisation and then use attribute_container_device_trigger to call class_device_add on it. Note: after this, the class device contains a reference to dev which is not relinquished until the release of the classdev.
This function allocates storage for the class device(s) to be attached to dev (one for each matching attribute_container). If no fn is provided, the code will simply register the class device via class_device_add. If a function is provided, it is expected to add the class device at the appropriate time. One of the things that might be necessary is to allocate and initialise the classdev and then add it a later time. To do this, call this routine for allocation and initialisation and then use attribute_container_device_trigger to call class_device_add on it. Note: after this, the class device contains a reference to dev which is not relinquished until the release of the classdev.