scfinit.c revision 25cf1a301a396c38e8adf52c15f537b80d2483f7
/*
* CDDL HEADER START
*
* 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
* 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]
*
* CDDL HEADER END
*/
/*
* All Rights Reserved, Copyright (c) FUJITSU LIMITED 2006
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
*/
static struct cb_ops scf_cb_ops = {
scf_open, /* open */
scf_close, /* close */
nodev, /* strategy */
nodev, /* print */
nodev, /* dump */
nodev, /* read */
nodev, /* write */
scf_ioctl, /* ioctl */
nodev, /* devmap */
nodev, /* mmap */
nodev, /* segmap */
nochpoll, /* poll */
ddi_prop_op, /* prop_op */
};
/*
* device operations structure
*/
static struct dev_ops scf_dev_ops = {
DEVO_REV, /* dev_ops revision */
0, /* reference */
scf_getinfo, /* getinfo */
nulldev, /* identify */
nulldev, /* probe */
scf_attach, /* attach */
scf_detach, /* detach */
nodev, /* reset */
&scf_cb_ops, /* cb_ops */
NULL /* power entry */
};
/*
* linkage structure for loadable driver
*/
extern struct mod_ops mod_driverops;
static struct modldrv scf_modldrv = {
&mod_driverops, /* mod_driverops */
SCF_DRIVER_VERSION, /* version number */
&scf_dev_ops /* dev_ops */
};
/*
* module linkage structure
*/
static struct modlinkage scf_modlinkage = {
MODREV_1, /* modlinkage revision */
(void *)&scf_modldrv, /* linkage */
(void *)NULL /* (end of linkage) */
};
/*
* Function list
*/
void scf_free_resource(void);
/*
* _init()
*
* Description: Install and initialization processing of module.
*
*/
int
_init(void)
{
#define SCF_FUNC_NAME "_init() "
int error;
/* initialize software state */
if (error != 0) {
goto END_init;
}
/* Last report code initialize */
/* XSCF status initialize */
/* allocate memory */
/* initialize mutex */
/* initialize cv */
/* install module into system */
if (error != 0) {
/* release driver resources */
}
/*
* END_init
*/
return (error);
}
/*
* _fini()
*
* Description: Remove processing of module.
*
*/
int
_fini(void)
{
#define SCF_FUNC_NAME "_fini() "
int error;
/* remove module from system */
if (error == 0) {
/* release driver resources */
}
return (error);
}
/*
* _info()
*
* Description: Return module information.
*
*/
int
{
#define SCF_FUNC_NAME "_info() "
int error;
/* return module infomarion */
return (error);
}
/*
* scf_free_resource()
*
* Description: Release processing of driver resources.
*
*/
/* ARGSUSED */
void
scf_free_resource(void)
{
#define SCF_FUNC_NAME "scf_free_resource() "
/* System interface area release */
(size_t)(sizeof (scfreport_t) *
}
}
/* destroy cv */
}
/* remove softint */
}
/* destroy mutex */
}
}
}
}
/* release software state */
}