pcs.c revision 11c2b4c0e543fe2e1e5910cde1f4422cc3218160
/*
* 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
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/byteorder.h>
static struct dev_ops pcs_devops = {
0,
NULL,
};
/*
* This is the loadable module wrapper.
*/
extern struct mod_ops mod_driverops;
&mod_driverops, /* Type of module. This one is a driver */
"PCMCIA Socket Driver %I%", /* Name of the module. */
&pcs_devops, /* driver ops */
};
static struct modlinkage modlinkage = {
};
struct pcs_inst {
} *pcs_instances;
int
_init()
{
int ret;
sizeof (struct pcs_inst), 1)) != 0)
return (ret);
ddi_soft_state_fini((void **)&pcs_instances);
}
return (ret);
}
int
_fini()
{
int ret;
if (ret == 0) {
ddi_soft_state_fini((void **)&pcs_instances);
}
return (ret);
}
int
{
}
int
{
int error = DDI_SUCCESS;
int inum;
#ifdef lint
#endif
switch (cmd) {
case DDI_INFO_DEVT2DEVINFO:
inum);
error = DDI_FAILURE;
else
break;
case DDI_INFO_DEVT2INSTANCE:
inum);
error = DDI_FAILURE;
else
break;
default:
error = DDI_FAILURE;
}
return (error);
}
int
{
int ret = DDI_SUCCESS;
int inum;
switch (cmd) {
case DDI_RESUME:
return (DDI_SUCCESS);
case DDI_ATTACH:
break;
default:
return (DDI_FAILURE);
}
inum);
ret = DDI_FAILURE;
else
}
return (ret);
}
int
{
switch (cmd) {
case DDI_DETACH:
return (DDI_SUCCESS);
case DDI_SUSPEND:
case DDI_PM_SUSPEND:
return (DDI_SUCCESS);
default:
break;
}
return (DDI_FAILURE);
}