2 .\" Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
3 .\" 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.
4 .\" 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.
5 .\" 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]
6 .TH DDI_GET_DRIVER_PRIVATE 9F "Jan 16, 2006"
8 ddi_get_driver_private, ddi_set_driver_private \- get or set the address of the
9 device's private data area
15 #include <sys/sunddi.h>
19 \fBvoid\fR \fBddi_set_driver_private\fR(\fBdev_info_t *\fR\fIdip\fR, \fBvoid\fR *\fIdata\fR);
24 \fBvoid\fR *\fBddi_get_driver_private\fR(\fBdev_info_t *\fR\fIdip\fR);
30 Solaris DDI specific (Solaris DDI).
34 \fBddi_get_driver_private()\fR
41 Pointer to device information structure to get from.
46 \fBddi_set_driver_private()\fR
53 Pointer to device information structure to set.
62 Data area address to set.
68 The \fBddi_get_driver_private()\fR function returns the address of the device's
69 private data area from the device information structure pointed to by
73 The \fBddi_set_driver_private()\fR function sets the address of the device's
74 private data area in the device information structure pointed to by \fIdip\fR
75 with the value of \fIdata\fR.
79 The \fBddi_get_driver_private()\fR function returns the contents of
80 \fBdevi_driver_data\fR. If \fBddi_set_driver_private()\fR has not been
81 previously called with \fIdip\fR, an unpredictable value is returned.
85 These functions can be called from user , interrupt, or kernel context.
89 \fIWriting Device Drivers\fR