xref: /titanic_44/usr/src/man/man9f/ddi_get_driver_private.9f (revision f05d7fc81533be643136e12ce92516d1d4292921)
te
Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
DDI_GET_DRIVER_PRIVATE 9F "Jan 16, 2006"
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