ATTRIBUTE_CONTAINER_ADD_DEVICE

Section: (9)
Updated: 09 October 2005
Index Return to Main Contents

 

NAME

attribute_container_add_device - see if any container is interested in dev  

SYNOPSIS

"SYNOPSIS"

void attribute_container_add_device (struct device * dev, int (*fn) struct attribute_container *, struct device *, struct class_device *);  

ARGUMENTS

dev
device to add attributes to
fn
function to trigger addition of class device.
 

DESCRIPTION

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.  

DESCRIPTION

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.


 

Index

NAME
SYNOPSIS
ARGUMENTS
DESCRIPTION
DESCRIPTION

This document was created by man2html, using the manual pages.
Time: 00:01:57 GMT, October 09, 2005