 |
Index for Section 9 |
|
 |
Alphabetical listing for C |
|
 |
Bottom of page |
|
create_device_struct(9r)
NAME
create_device_struct - General: Creates a device structure for the system
(hardware) configuration tree
SYNOPSIS
int create_device_struct(
struct device_config *dev_cnfg );
ARGUMENTS
dev_cnfg
Specifies a pointer to the device_config structure associated with a
specific device. You set the members of the device_config structure to
appropriate values and then pass the address of the filled-in structure
to create_device_struct.
DESCRIPTION
The create_device_struct interface creates a device structure for each
instance of a device that the device driver supports. The interface
integrates the device structure for a specific device into the list of
device structures that reside in the system configuration tree.
NOTES
Typically, you supply the information needed by the create_device_struct
interface by passing to it the address of the filled-in device_config
structure. However, if any of this information needs to be configurable
(that is, you want to give a system manager the ability to dynamically
change this information), you must:
· Define attributes for the information contained in the device_config
structure in the sysconfigtab file fragment
· Define these attributes in the driver's cfg_subsys_attr_t data
structure
· Check these attribute definitions in the device driver's configure
interface and appropriately modify the call to create_device_struct
EXAMPLE
See Writing Device Drivers: Tutorial for a code example of the
create_device_struct interface.
RETURN VALUES
Upon successful completion, create_device_struct returns ESUCCESS. On
failure, it returns EINVAL.
SEE ALSO
Kernel Interfaces: create_controller_struct(9r)
Data Structures: device_config(9s)
 |
Index for Section 9 |
|
 |
Alphabetical listing for C |
|
 |
Top of page |
|