man pages section 9: DDI and DKI Kernel Functions

Exit Print View

Updated: July 2014
 
 

ddi_get_driver_private(9F)

Name

ddi_get_driver_private, ddi_set_driver_private - get or set the address of the device's private data area

Synopsis

#include <sys/conf.h>
#include <sys/ddi.h>
#include <sys/sunddi.h>

void ddi_set_driver_private(dev_info_t *dip, void *data);
void *ddi_get_driver_private(dev_info_t *dip);

Interface Level

Solaris DDI specific (Solaris DDI).

Parameters

ddi_get_driver_private()

dip

Pointer to device information structure to get from.

ddi_set_driver_private()

dip

Pointer to device information structure to set.

data

Data area address to set.

Description

The ddi_get_driver_private() function returns the address of the device's private data area from the device information structure pointed to by dip.

The ddi_set_driver_private() function sets the address of the device's private data area in the device information structure pointed to by dip with the value of data.

Return Values

The ddi_get_driver_private() function returns the contents of devi_driver_data. If ddi_set_driver_private() has not been previously called with dip, an unpredictable value is returned.

Context

These functions can be called from user , interrupt, or kernel context.

See also

Writing Device Drivers for Oracle Solaris 11.2