xref: /illumos-gate/usr/src/uts/i86pc/io/gfx_private/gfx_private.c (revision fc1821fee2e1f208a4b5ff3e229e97b87979208a)
1*fc1821feSrugrat /*
2*fc1821feSrugrat  * CDDL HEADER START
3*fc1821feSrugrat  *
4*fc1821feSrugrat  * The contents of this file are subject to the terms of the
5*fc1821feSrugrat  * Common Development and Distribution License, Version 1.0 only
6*fc1821feSrugrat  * (the "License").  You may not use this file except in compliance
7*fc1821feSrugrat  * with the License.
8*fc1821feSrugrat  *
9*fc1821feSrugrat  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*fc1821feSrugrat  * or http://www.opensolaris.org/os/licensing.
11*fc1821feSrugrat  * See the License for the specific language governing permissions
12*fc1821feSrugrat  * and limitations under the License.
13*fc1821feSrugrat  *
14*fc1821feSrugrat  * When distributing Covered Code, include this CDDL HEADER in each
15*fc1821feSrugrat  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*fc1821feSrugrat  * If applicable, add the following below this CDDL HEADER, with the
17*fc1821feSrugrat  * fields enclosed by brackets "[]" replaced with your own identifying
18*fc1821feSrugrat  * information: Portions Copyright [yyyy] [name of copyright owner]
19*fc1821feSrugrat  *
20*fc1821feSrugrat  * CDDL HEADER END
21*fc1821feSrugrat  */
22*fc1821feSrugrat /*
23*fc1821feSrugrat  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24*fc1821feSrugrat  * Use is subject to license terms.
25*fc1821feSrugrat  */
26*fc1821feSrugrat 
27*fc1821feSrugrat #pragma ident	"%Z%%M%	%I%	%E% SMI"
28*fc1821feSrugrat 
29*fc1821feSrugrat /*
30*fc1821feSrugrat  * Private interfaces for graphics drivers for which there
31*fc1821feSrugrat  * are yet no acceptable DDI interfaces.
32*fc1821feSrugrat  */
33*fc1821feSrugrat 
34*fc1821feSrugrat #include <sys/types.h>
35*fc1821feSrugrat #include <sys/param.h>
36*fc1821feSrugrat #include <sys/sunddi.h>
37*fc1821feSrugrat #include <sys/ddi_subrdefs.h>
38*fc1821feSrugrat #include <sys/bootconf.h>
39*fc1821feSrugrat #include <sys/psw.h>
40*fc1821feSrugrat #include <sys/modctl.h>
41*fc1821feSrugrat #include <sys/errno.h>
42*fc1821feSrugrat #include <sys/reboot.h>
43*fc1821feSrugrat #include "gfx_private.h"
44*fc1821feSrugrat 
45*fc1821feSrugrat static struct modlmisc modlmisc = {
46*fc1821feSrugrat 	&mod_miscops, "gfx private interfaces %I%"
47*fc1821feSrugrat };
48*fc1821feSrugrat 
49*fc1821feSrugrat static struct modlinkage modlinkage = {
50*fc1821feSrugrat 	MODREV_1, (void *)&modlmisc, NULL
51*fc1821feSrugrat };
52*fc1821feSrugrat 
53*fc1821feSrugrat int
54*fc1821feSrugrat _init(void)
55*fc1821feSrugrat {
56*fc1821feSrugrat 	int	err;
57*fc1821feSrugrat 
58*fc1821feSrugrat 	if ((err = mod_install(&modlinkage)) != 0)
59*fc1821feSrugrat 		return (err);
60*fc1821feSrugrat 	return (0);
61*fc1821feSrugrat }
62*fc1821feSrugrat 
63*fc1821feSrugrat int
64*fc1821feSrugrat _fini(void)
65*fc1821feSrugrat {
66*fc1821feSrugrat 	int	err;
67*fc1821feSrugrat 
68*fc1821feSrugrat 	if ((err = mod_remove(&modlinkage)) != 0)
69*fc1821feSrugrat 		return (err);
70*fc1821feSrugrat 
71*fc1821feSrugrat 	return (0);
72*fc1821feSrugrat }
73*fc1821feSrugrat 
74*fc1821feSrugrat int
75*fc1821feSrugrat _info(struct modinfo *modinfop)
76*fc1821feSrugrat {
77*fc1821feSrugrat 	return (mod_info(&modlinkage, modinfop));
78*fc1821feSrugrat }
79