ddi_get_instance(9F)
NAME
ddi_get_instance − get device instance number
SYNOPSIS
#include <sys/ddi.h>
#include <sys/sunddi.h>
int ddi_get_instance(dev_info_t ∗dip);
INTERFACE LEVEL
SPARC architecture specific (SPARC DDI).
ARGUMENTS
dip Pointer to dev_info structure.
DESCRIPTION
ddi_get_instance() returns the instance number of the device corresponding to dip. Instance number ranges from zero to the number of devices attached to the driver minus one.
RETURN VALUES
ddi_get_instance() returns an integer between 0 and the number of instances of this device.
CONTEXT
ddi_get_instance() can be called from user or interrupt context.
Sun Microsystems — Last change: 5 Oct 1991